close
Warning:
AdminModule failed with TracError: Unable to instantiate component <class 'trac.ticket.admin.ComponentAdminPanel'> (super(type, obj): obj must be an instance or subtype of type)
- Timestamp:
-
Nov 24, 2010, 2:12:18 PM (15 years ago)
- Author:
-
trac
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v2
|
v3
|
|
| 45 | 45 | |
| 46 | 46 | To setup Trac environment for `mod_fcgid` it is necessary to use |
| 47 | | `FCGIDDefaultInitEnv` directive. It cannot be used in `Directory` or |
| | 47 | `DefaultInitEnv` directive. It cannot be used in `Directory` or |
| 48 | 48 | `Location` context, so if you need to support multiple projects, try |
| 49 | 49 | alternative environment setup below. |
| 50 | 50 | |
| 51 | 51 | {{{ |
| 52 | | FCGIDDefaultInitEnv TRAC_ENV /path/to/env/trac/ |
| | 52 | DefaultInitEnv TRAC_ENV /path/to/env/trac/ |
| 53 | 53 | }}} |
| 54 | 54 | |
| … |
… |
|
| 122 | 122 | and you may set one of the two in `trac.fcgi` instead of in `lighttpd.conf` |
| 123 | 123 | using `bin-environment` (as in the section above on Apache configuration). |
| | 124 | |
| | 125 | Note that lighttpd has a bug related to 'SCRIPT_NAME' and 'PATH_INFO' when the uri of fastcgi.server is '/' instead of '/trac' in this example, see #Trac2418. This should be fixed since lighttpd 1.4.23, and you may need to add `"fix-root-scriptname" => "enable"` as parameter of fastcgi.server. |
| 124 | 126 | |
| 125 | 127 | For using two projects with lighttpd add the following to your `lighttpd.conf`: |
| … |
… |
|
| 275 | 277 | Note about running lighttpd with reduced permissions: |
| 276 | 278 | |
| 277 | | If nothing else helps and trac.fcgi doesn't start with lighttpd settings __server.username = "www-data"__, __server.groupname = "www-data"__, then in the `bin-environment` section set `PYTHON_EGG_CACHE` to the home directory of `www-data` or some other directory accessible to this account for writing. |
| | 279 | If nothing else helps and trac.fcgi doesn't start with lighttpd settings `server.username = "www-data"`, `server.groupname = "www-data"`, then in the `bin-environment` section set `PYTHON_EGG_CACHE` to the home directory of `www-data` or some other directory accessible to this account for writing. |
| 278 | 280 | |
| 279 | 281 | |
| … |
… |
|
| 284 | 286 | !LiteSpeed web server is an event-driven asynchronous Apache replacement designed from the ground-up to be secure, scalable, and operate with minimal resources. !LiteSpeed can operate directly from an Apache config file and is targeted for business-critical environments. |
| 285 | 287 | |
| 286 | | Setup |
| 287 | | |
| 288 | | 1) Please make sure you have first have a working install of a Trac project. Test install with “tracd” first. |
| 289 | | |
| 290 | | 2) Create a Virtual Host for this setup. From now on we will refer to this vhost as TracVhost. For this tutorial we will be assuming that your trac project will be accessible via: |
| | 288 | === Setup === |
| | 289 | |
| | 290 | 1. Please make sure you have first have a working install of a Trac project. Test install with “tracd” first. |
| | 291 | |
| | 292 | 2. Create a Virtual Host for this setup. From now on we will refer to this vhost as !TracVhost. For this tutorial we will be assuming that your trac project will be accessible via: |
| 291 | 293 | |
| 292 | 294 | {{{ |
| … |
… |
|
| 294 | 296 | }}} |
| 295 | 297 | |
| 296 | | 3) Go “TracVhost → External Apps” tab and create a new “External Application”. |
| | 298 | 3. Go “!TracVhost → External Apps” tab and create a new “External Application”. |
| 297 | 299 | |
| 298 | 300 | {{{ |
| … |
… |
|
| 312 | 314 | }}} |
| 313 | 315 | |
| 314 | | 4) Optional. If you need to use htpasswd based authentication. Go to “TracVhost → Security” tab and create a new security “Realm”. |
| | 316 | 4. Optional. If you need to use htpasswd based authentication. Go to “!TracVhost → Security” tab and create a new security “Realm”. |
| 315 | 317 | |
| 316 | 318 | {{{ |
| … |
… |
|
| 322 | 324 | If you don’t have a htpasswd file or don’t know how to create the entries within one, go to http://sherylcanter.com/encrypt.php, to generate the user:password combos. |
| 323 | 325 | |
| 324 | | 5) Go to “PythonVhost → Contexts” and create a new “FCGI Context”. |
| | 326 | 5. Go to “!PythonVhost → Contexts” and create a new “FCGI Context”. |
| 325 | 327 | |
| 326 | 328 | {{{ |
| … |
… |
|
| 330 | 332 | }}} |
| 331 | 333 | |
| 332 | | 6) Modify /fullpathto/mytracproject/conf/trac.ini |
| | 334 | 6. Modify `/fullpathto/mytracproject/conf/trac.ini` |
| 333 | 335 | |
| 334 | 336 | {{{ |
| … |
… |
|
| 339 | 341 | }}} |
| 340 | 342 | |
| 341 | | 7) Restart !LiteSpeed, “lswsctrl restart”, and access your new Trac project at: |
| | 343 | 7. Restart !LiteSpeed, “lswsctrl restart”, and access your new Trac project at: |
| 342 | 344 | |
| 343 | 345 | {{{ |
| … |
… |
|
| 345 | 347 | }}} |
| 346 | 348 | |
| 347 | | === Simple Nginx Configuration === |
| 348 | | |
| 349 | | 1) Nginx configuration snippet - confirmed to work on 0.6.32 |
| | 349 | == Simple Nginx Configuration == |
| | 350 | |
| | 351 | 1. Nginx configuration snippet - confirmed to work on 0.6.32 |
| 350 | 352 | {{{ |
| 351 | 353 | server { |
| … |
… |
|
| 394 | 396 | fastcgi_param SERVER_PORT $server_port; |
| 395 | 397 | fastcgi_param SERVER_PROTOCOL $server_protocol; |
| | 398 | fastcgi_param QUERY_STRING $query_string; |
| 396 | 399 | |
| 397 | 400 | # for authentication to work |
| … |
… |
|
| 402 | 405 | }}} |
| 403 | 406 | |
| 404 | | 2) Modified trac.fcgi: |
| | 407 | 2. Modified trac.fcgi: |
| 405 | 408 | |
| 406 | 409 | {{{ |
| … |
… |
|
| 436 | 439 | }}} |
| 437 | 440 | |
| 438 | | 3) reload nginx and launch trac.fcgi like that: |
| | 441 | 3. reload nginx and launch trac.fcgi like that: |
| 439 | 442 | |
| 440 | 443 | {{{ |
| … |
… |
|
| 444 | 447 | The above assumes that: |
| 445 | 448 | * There is a user named 'trac' for running trac instances and keeping trac environments in its home directory. |
| 446 | | * /home/trac/instance contains a trac environment |
| 447 | | * /home/trac/htpasswd contains authentication information |
| 448 | | * /home/trac/run is owned by the same group the nginx runs under |
| 449 | | * and if your system is Linux the /home/trac/run has setgid bit set (chmod g+s run) |
| | 449 | * `/home/trac/instance` contains a trac environment |
| | 450 | * `/home/trac/htpasswd` contains authentication information |
| | 451 | * `/home/trac/run` is owned by the same group the nginx runs under |
| | 452 | * and if your system is Linux the `/home/trac/run` has setgid bit set (`chmod g+s run`) |
| 450 | 453 | * and patch from ticket #T7239 is applied, or you'll have to fix the socket file permissions every time |
| 451 | 454 | |