Changes between Version 42 and Version 43 of TracFastCgi
- Timestamp:
- May 14, 2008, 11:17:05 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracFastCgi
v42 v43 387 387 {{{ 388 388 #!/usr/bin/env python 389 389 import os 390 390 sockaddr = '/home/trac/run/instance.sock' 391 os.environ['TRAC_ENV'] = '/home/trac/instance' 391 392 392 393 try: … … 394 395 import trac.web._fcgi 395 396 396 fcgiserv = trac.web._fcgi.WSGIServer(dispatch_request, bindAddress = sockaddr) 397 fcgiserv = trac.web._fcgi.WSGIServer(dispatch_request, 398 bindAddress = sockaddr, umask = 7) 397 399 fcgiserv.run() 398 400 … … 418 420 419 421 {{{ 420 trac@trac.example ~ $ TRAC_ENV=/home/trac/instance./trac-standalone-fcgi.py422 trac@trac.example ~ $ ./trac-standalone-fcgi.py 421 423 }}} 422 424 423 425 The above assumes that: 424 * There is a user tracfor running trac instances and keeping trac environments in its home directory.426 * There is a user named 'trac' for running trac instances and keeping trac environments in its home directory. 425 427 * /home/trac/instance contains a trac environment 426 428 * /home/trac/htpasswd contains authentication information 427 428 You may have to chmod the unix socket file so that nginx can connect to it. Check this if you keep getting 502 errors. 429 430 Unfortunately nginx does not support variable expansion in fastcgi_pass directive, thus it is not possible to serve multiple trac instances from one server block. 429 * /home/trac/run is owned by the same group the nginx runs under 430 * and if your system is Linux the /home/trac/run has setgid bit set (chmod g+s run) 431 * and patch from ticket #7239 is applied, or you'll have to fix the socket file permissions every time 432 433 Unfortunately nginx does not support variable expansion in fastcgi_pass directive. 434 Thus it is not possible to serve multiple trac instances from one server block. 431 435 432 436 If you worry enough about security, run trac instances under separate users.