Changes between Version 1 and Version 2 of TracModPython
- Timestamp:
- Apr 13, 2011, 9:00:48 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracModPython
v1 v2 6 6 These instructions are for Apache 2; if you are still using Apache 1.3, you may have some luck with [trac:wiki:TracModPython2.7 TracModPython2.7]. 7 7 8 == A Word of Warning == 9 10 As of 16^th^ June 2010, the mod_python project is officially dead. If you are considering using mod_python for a new installation, '''please don't'''! There are known issues which will not be fixed and there are now better alternatives. Check out the main TracInstall pages for your target version for more information. 11 8 12 == Simple configuration == 9 13 … … 21 25 (Still on Debian) after you have installed mod_python, you must enable the modules in apache2 (equivalent of the above Load Module directive): 22 26 {{{ 23 a2enmod mod_python27 a2enmod python 24 28 }}} 25 29 On Fedora use, using yum: … … 34 38 PythonInterpreter main_interpreter 35 39 PythonHandler mod_python.testhandler 40 Order allow,deny 41 Allow from all 36 42 </Location> 37 43 }}} … … 46 52 PythonOption TracEnv /var/trac/myproject 47 53 PythonOption TracUriRoot /projects/myproject 54 Order allow,deny 55 Allow from all 48 56 </Location> 49 57 }}} … … 281 289 Using <Location /> together with `SetHandler` resulted in having everything handled by mod_python, which leads to not being able download any CSS or images/icons. I used <Location /trac> `SetHandler None` </Location> to circumvent the problem, though I do not know if this is the most elegant solution. 282 290 291 === Problem with zipped egg === 292 293 It's possible that your version of mod_python will not import modules from zipped eggs. If you encounter an `ImportError: No module named trac` in your Apache logs but you think everything is where it should be, this might be your problem. Look in your site-packages directory; if the Trac module appears as a ''file'' rather than a ''directory'', then this might be your problem. To rectify, try installing Trac using the `--always-unzip` option, like this: 294 295 {{{ 296 easy_install --always-unzip Trac-0.12b1.zip 297 }}} 298 283 299 === Using .htaccess === 284 300 … … 367 383 368 384 Note: For the above configuration to have any effect it must be put after the configuration of your project root location, i.e. {{{<Location /myproject />}}}. 385 386 Also, setting `PythonOptimize On` seems to mess up the page headers and footers, in addition to hiding the documentation for macros and plugins (see #Trac8956). Considering how little effect the option has, it is probably a good idea to leave it `Off`. 369 387 370 388 === HTTPS issues === … … 391 409 392 410 ---- 393 See also: TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracFastCgi FastCGI], [wiki:TracModPython ModPython],[trac:TracNginxRecipe TracNginxRecipe]411 See also: TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracFastCgi FastCGI], [trac:TracNginxRecipe TracNginxRecipe]