Edgewall Software

Changes between Version 116 and Version 117 of 0.12/TracFaq


Ignore:
Timestamp:
Jan 31, 2005, 2:16:39 AM (19 years ago)
Author:
ryandesign
Comment:

corrected/improved Apache nice-URL configuration

Legend:

Unmodified
Added
Removed
Modified
  • 0.12/TracFaq

    v116 v117  
    5858-----------------------------------------------
    5959
    60 If you are serving Trac with Apache 2, you can use directives of the
    61 following form to translate the url "http://myserver.com/trac" to
    62 "$APACHE_PATH$/cgi-bin/trac.cgi".  Note the URL in the Location
    63 
    64 directives is the same one that the end-user would see.  With this
    65 example, you would also need to change the `TracIni`:trac: file to find
    66 static files at a location other than /trac.
    67 
    68 
    69 ::
    70 
    71    # translates /trac to /cgi-bin/trac.cgi
    72    ScriptAliasMatch ^/trac(.*) "C:/Program Files/Apache Group/Apache2/cgi-bin/trac.cgi$1"
    73 
    74    # sets up environment for Trac
    75    <Location "/trac">
    76      # For 0.7 release
     60If you are serving Trac with Apache, you can use the following directives
     61to let your users access Trac with URLs like "http://www.example.com/trac/" rather
     62than the default "http://www.example.com/cgi-bin/trac.cgi".
     63This example shows how to set it up for Apache 2 on a Windows
     64server, but it works just as well with Apache 1.3 or on Unix.
     65
     66::
     67
     68   # Map the Trac CGI into /trac/
     69   ScriptAliasMatch ^/trac/(.*) "C:/Program Files/Apache Group/Apache2/cgi-bin/trac.cgi/$1"
     70
     71   # Fix users who don't type the trailing slash
     72   RedirectMatch ^/trac$ /trac/
     73
     74   # Tell Trac where its environment is stored
     75   <Location "/trac/">
    7776     SetEnv TRAC_ENV "C:/Subversion/trac/CogTool.db"
    7877   </Location>
    7978
    80    # authentication
     79   # Authenticate the user
    8180   <Location "/trac/login">
    8281     AuthType Basic
    83      AuthName "CogTool Project Trac"
     82     AuthName "Trac"
    8483     AuthUserFile C:/Subversion/Repo/svn-users
    8584     Require valid-user
    8685   </Location>
    8786
    88    # static files used to display images and templates
    89    # you will need to change the conf/trac.ini file to point to /trac-docs instead of /trac
    90    Alias /trac-docs "C:/Subversion/trac/htdocs"
     87   # Link the static files into /trac-static/
     88   # You'll need to change the trac.ini to point to /trac-static/ instead of /trac/
     89   Alias /trac-static/ "C:/Subversion/trac/htdocs/"
     90
     91   # Allow access to the Trac static files
    9192   <Directory "C:/Subversion/trac/htdocs">
    92      Options Indexes MultiViews
    9393     AllowOverride None
    9494     Order allow,deny