| 245 | |
| 246 | == Simple LiteSpeed Configuration == |
| 247 | |
| 248 | The FastCGI front-end was developed primarily for use with alternative webservers, such as [http://www.litespeedtech.com/ LiteSpeed]. |
| 249 | |
| 250 | 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. |
| 251 | |
| 252 | Setup |
| 253 | |
| 254 | 1) Please make sure you have first have a working install of a Trac project. Test install with “tracd” first. |
| 255 | |
| 256 | 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: |
| 257 | |
| 258 | {{{ |
| 259 | http://yourdomain.com/trac/ |
| 260 | }}} |
| 261 | |
| 262 | 3) Go “TracVhost → External Apps” tab and create a new “External Application”. |
| 263 | |
| 264 | {{{ |
| 265 | Name: MyTracFCGI |
| 266 | Address: uds://tmp/lshttpd/mytracfcgi.sock |
| 267 | Max Connections: 10 |
| 268 | Environment: TRAC_ENV=/fullpathto/mytracproject/ <--- path to root folder of trac project |
| 269 | Initial Request Timeout (secs): 30 |
| 270 | Retry Timeout (secs): 0 |
| 271 | Persistent Connection Yes |
| 272 | Connection Keepalive Timeout: 30 |
| 273 | Response Bufferring: No |
| 274 | Auto Start: Yes |
| 275 | Command: /usr/share/trac/cgi-bin/trac.fcgi <--- path to trac.fcgi |
| 276 | Back Log: 50 |
| 277 | Instances: 10 |
| 278 | }}} |
| 279 | |
| 280 | 4) Optional. If you need to use htpasswd based authentication. Go to “TracVhost → Security” tab and create a new security “Realm”. |
| 281 | |
| 282 | {{{ |
| 283 | DB Type: Password File |
| 284 | Realm Name: MyTracUserDB <--- any name you wish and referenced later |
| 285 | User DB Location: /fullpathto/htpasswd <--- path to your htpasswd file |
| 286 | }}} |
| 287 | |
| 288 | 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. |
| 289 | |
| 290 | 5) Go to “PythonVhost → Contexts” and create a new “FCGI Context”. |
| 291 | |
| 292 | {{{ |
| 293 | URI: /trac/ <--- URI path to bind to python fcgi app we created |
| 294 | Fast CGI App: [VHost Level] MyTractFCGI <--- select the trac fcgi extapp we just created |
| 295 | Realm: TracUserDB <--- only if (4) is set. select ream created in (4) |
| 296 | }}} |
| 297 | |
| 298 | 6) Modify /fullpathto/mytracproject/conf/trac.ini |
| 299 | |
| 300 | {{{ |
| 301 | #find/set base_rul, url, and link variables |
| 302 | base_url = http://yourdomain.com/trac/ <--- base url to generate correct links to |
| 303 | url = http://yourdomain.com/trac/ <--- link of project |
| 304 | link = http://yourdomain.com/trac/ <--- link of graphic logo |
| 305 | }}} |
| 306 | |
| 307 | 7) Restart LiteSpeed, “lswsctrl restart”, and access your new Trac project at: |
| 308 | |
| 309 | {{{ |
| 310 | http://yourdomain.com/trac/ |
| 311 | }}} |
| 312 | |