Changes between Version 2 and Version 3 of TracLitespeed
- Timestamp:
- Feb 21, 2015, 11:24:49 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracLitespeed
v2 v3 1 = Basic Multiproject under Litespeed =1 = Basic Multiproject under Litespeed 2 2 3 3 This document specifies how to modify an existing Trac setup to work with [http://litespeedtech.com/ Litespeed]. It assumes you have a working Trac install which can serve single Trac projects using the tracd server. 4 4 5 This document assumes some default paths , such as5 This document assumes some default paths for the basic Trac installation, such as: 6 6 * /usr/share/trac/ 7 7 * /usr/lib/python-[ver]/site-packages/trac/ 8 for the basic Trac installation.9 8 10 This document _also_ assumes you wish to setup Trac to use a dedicated subdomain. It should be trivial, however, to change this behaviour.9 This document also assumes you wish to setup Trac to use a dedicated subdomain. It should be trivial to change this behavior however. 11 10 12 == Allowing project-based URL's in Trac ==11 == Allowing project-based URL's in Trac 13 12 14 Edit the Trac main.py file. On Linux this file can be found in /usr/lib/python-[ ver]/site-packages/trac/web/main.py where [ver] is replaced with your python version (such as 2.4).13 Edit the Trac main.py file. On Linux this file can be found in /usr/lib/python-[x.y]/site-packages/trac/web/main.py where [x.y] is replaced with your Python version (such as 2.4). 15 14 16 Replace the line 15 Replace the line: 17 16 {{{ 18 17 env.href = Href(req.cgi_location) 19 18 }}} 20 with 19 with: 21 20 {{{ 22 21 env.href = Href(req.base_url) 23 22 }}} 24 save and exit25 23 26 This modification allows Trac to generate URL's based on the __project path__ rather than the cgi path.24 This modification allows Trac to generate URL's based on the '''project path''' rather than the '''CGI path'''. 27 25 28 You will also need to add the following line to each of your project's trac.ini files manually. 29 30 Under [trac] add 26 Edit the trac.ini file. Under [trac] add: 31 27 {{{ 32 28 base_url = /projects/[projectname] 33 29 }}} 34 30 35 The following example will make the 'test' project accessable at http://yourdomain.tld/projects/test 31 The following example will make the 'test' project accessable at http://yourdomain.tld/projects/test: 36 32 {{{ 37 33 base_url = /projects/test 38 34 }}} 39 35 40 == Creating Litespeed Config ==36 == Creating the Litespeed Config 41 37 42 Using the Litespeed configuration panel 38 Using the Litespeed configuration panel: 43 39 44 40 * Create a Trac virtual host … … 50 46 RewriteRule ^/projects/(.*) /index.html 51 47 }}} 52 * Add a Static context with the following 48 * Add a Static context with the following: 53 49 * URI: /trac.cgi/chrome/common 54 50 * Location: /usr/share/trac/htdocs … … 56 52 * Enable Expires: No 57 53 58 * Create a CGI context with the following 54 * Create a CGI context with the following: 59 55 * URI: / 60 56 * Path: /usr/share/trac/cgi-bin/ … … 62 58 * Save and reload Litespeed 63 59 64 This will make project accessable through the address 60 This will make project accessable through the address: 65 61 {{{ 66 62 http://subdomain.domain.tld/projects/[projectname] 67 63 }}} 68 64 69 == Basic Security ==65 == Basic Security 70 66 71 To set up a basic catch-all security net for your projects, simply follow this guide 67 To set up a basic catch-all security net for your projects, simply follow this guide: 72 68 73 69 * Create a new security realm using the Litespeed config and point it to your Password file. 74 * Don't have one, use http://sherylcanter.com/encrypt.php to generate username:password combos.70 * If you don't have one, use http://sherylcanter.com/encrypt.php to generate username:password combos. 75 71 * Assign the security realm to the Trac CGI context. 76 72 * Trac will be able understand this security context. 73 74 ---- 75 See also: BloodHound