Edgewall Software

Changes between Version 13 and Version 14 of TracModPython


Ignore:
Timestamp:
Feb 24, 2005, 5:28:11 PM (19 years ago)
Author:
Christopher Lenz
Comment:

Added note about static directory conflicting with mod_python

Legend:

Unmodified
Added
Removed
Modified
  • TracModPython

    v13 v14  
    44
    55Be sure to grab mod_python 3.1.3 and later for ''SetHandler'' ''mod_python'' directive to work.  Also, older versions may generate an internal error.  [http://projects.edgewall.com/trac/ticket/1090 #1090]
    6 
    7 == Warning! ==
    8 
    9 Although it may seem trivial to rewrite the below configuration as a directory in your document root with a .htaccess file, this does not work. Apache will append a "/" to any Trac URLs, which interferes with its correct operation.
    10 
    11 It may be possible to work around this with mod_rewrite, but I failed to get this working. In all, it is more hassle than it is worth. Stick to the provided instructions. :)
    12 
    136
    147== Simple configuration ==
     
    3427}}}
    3528
    36 Also do not forget to fix your authentication setup from the original <Location "/cgi-bin/trac.cgi/login"> to:
     29Note that the option ''TracUriRoot'' may or may not be necessary in your setup. Try without first, and if the URLs produced by Trac look wrong, add the ''TracUriRoot'' option.
     30
     31Authentication works the same as for CGI:
    3732
    3833{{{
     
    4439</Location>
    4540}}}
    46 
    47 Note that the option ''TracUriRoot'' may or may not be necessary in your setup. Try without first, and if the URLs produced by Trac look wrong, add the ''TracUriRoot'' option.
    4841
    4942== Setting up a project on the root of the webserver ==
     
    9083When you request the {{{/projects}}} URL, you will get a (currently very simple) listing of all subdirectories of the directory you set as {{{TracEnvParentDir}}}. Selecting any project in the list will bring you to the corresponding Trac instance. You should make sure that the configured directory only contains Trac environment directories that match the currently installed Trac version, because that is not checked prior the the generation of the project list.
    9184
     85== Troubleshooting ==
    9286
    93 == Adding authentication ==
     87=== Form submission problems ===
    9488
    95 Adding authentication is straightforward in both cases. For example:
     89If you're experiencing problems submitting some of the forms in Trac (a common problem is that you get redirected to the start page after submission), check whether your {{{DocumentRoot}}} contains a folder or file with the same path that you mapped the mod_python handler to. For some reason, mod_python gets confused when it is mapped to a location that also matches a static resource.
    9690
    97 {{{
    98 <LocationMatch /projects/[[:alnum:]]+/login>
    99   AuthType Basic
    100   AuthName "Trac"
    101   AuthUserFile /var/www/passwd
    102   Require valid-user
    103 </LocationMatch>
    104 }}}
     91=== Using .htaccess ===
    10592
    106 == Win32 Issues ==
     93Although it may seem trivial to rewrite the above configuration as a directory in your document root with a {{{.htaccess}}} file, this does not work. Apache will append a "/" to any Trac URLs, which interferes with its correct operation.
     94
     95It may be possible to work around this with mod_rewrite, but I failed to get this working. In all, it is more hassle than it is worth. Stick to the provided instructions. :)
     96
     97=== Win32 Issues ===
    10798
    10899If you run trac with mod_python on Windows, attachments will not work.
     
    111102ticket [http://projects.edgewall.com/trac/ticket/554 #554].
    112103
    113 == OS X issues ==
     104=== OS X issues ===
    114105
    115106There is a mod_python issue on OSX: Look at the end of its README.