Changes between Version 115 and Version 116 of TracModPython
- Timestamp:
- Aug 3, 2007, 1:26:25 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracModPython
v115 v116 22 22 You can test your mod_python installation by adding the following to your httpd.conf. You should remove this when you are done testing for security reasons. Note: mod_python.testhandler is only available in mod_python 3.2+. 23 23 {{{ 24 #!xml 24 25 <Location /mpinfo> 25 26 SetHandler mod_python … … 30 31 A simple setup of Trac on mod_python looks like this: 31 32 {{{ 33 #!xml 32 34 <Location /projects/myproject> 33 35 SetHandler mod_python … … 44 46 Creating password files and configuring authentication works similar to the process for [wiki:TracCgi#AddingAuthentication CGI]: 45 47 {{{ 48 #!xml 46 49 <Location /projects/myproject/login> 47 50 AuthType Basic … … 63 66 64 67 {{{ 68 #!xml 65 69 <Location /trac/> 66 70 SetHandler mod_python … … 83 87 84 88 {{{ 89 #!xml 85 90 <Location /trac/> 86 91 SetHandler mod_python … … 115 120 If the Trac installation isn't installed in your Python path, you'll have to tell Apache where to find the Trac mod_python handler using the `PythonPath` directive: 116 121 {{{ 122 #!xml 117 123 <Location /projects/myproject> 118 124 ... … … 128 134 The Trac mod_python handler supports a configuration option similar to Subversion's `SvnParentPath`, called `TracEnvParentDir`: 129 135 {{{ 136 #!xml 130 137 <Location /projects> 131 138 SetHandler mod_python … … 140 147 If you don't want to have the subdirectory listing as your projects home page you can use a 141 148 {{{ 149 #!xml 142 150 <LocationMatch "/.+/"> 143 151 }}} … … 147 155 You can also use the same authentication realm for all of the projects using a `<LocationMatch>` directive: 148 156 {{{ 157 #!xml 149 158 <LocationMatch "/projects/[^/]+/login"> 150 159 AuthType Basic … … 161 170 162 171 {{{ 172 #!xml 163 173 <VirtualHost * > 164 174 DocumentRoot /var/www/myproject … … 187 197 In general, if you get server error pages, you can either check the Apache error log, or enable the `PythonDebug` option: 188 198 {{{ 199 #!xml 189 200 <Location /projects/myproject> 190 201 ... … … 256 267 If the formatting of the Trac pages look weird chances are that the style sheets governing the page layout are not handled properly by the web server. Try adding the following lines to your apache configuration: 257 268 {{{ 269 #!xml 258 270 Alias /myproject/css "/usr/share/trac/htdocs/css" 259 271 <Location /myproject/css> … … 268 280 If you want to run Trac fully under https you might find that it tries to redirect to plain http. In this case just add the following line to your apache configuration: 269 281 {{{ 282 #!xml 270 283 <VirtualHost * > 271 284 DocumentRoot /var/www/myproject