Edgewall Software

Changes between Version 1 and Version 2 of TracOnWindowsIis6


Ignore:
Timestamp:
Nov 2, 2004, 4:25:00 AM (20 years ago)
Author:
GeoffCant
Comment:

More info

Legend:

Unmodified
Added
Removed
Modified
  • TracOnWindowsIis6

    v1 v2  
    2424
    2525----
    26 Note: This example installs to F: (for extra points, then goes DarkReign hard with a seperate application pool and so on.)
     26Note: This example installs to F: (for extra points, then goes DarkReign hard with a separate application pool and so on.)
    2727----
    2828
     
    144144=== Fix a few things ===
    145145
    146 23. Copy CGI
    147 {{{
    148 D:\> copy d:\python23\share\trac\cgi-bin\trac.cgi d:\progra~1\apache~1\apache2\cgi-bin
    149 }}}
     14623. Rename and fix CGI
     147  F:\Python23\share\trac\cgi-bin\trac.py should be F:\Python23\share\trac\cgi-bin\wtrac.py or similar (trac.py breaks with a can't find core.py error)
     148
     149Fix the new wtrac.py to look like:
     150{{{
     151try:   
     152    import os;os.environ['TRAC_ENV'] = 'F:\\tracsvn\\trac.db'
     153    import trac.core
     154    trac.core.cgi_start()
     155}}}
     156
     157The TRAC_ENV line is important as IIS6 won't pass this environment variable to the script when it runs.
    150158
    151159=== Configure Trac DB ===
     
    15516325. Run trac-admin
    156164{{{
    157 D:\Python23\Scripts> python trac-admin d:/svn/trac.db
     165D:\Python23\Scripts> python trac-admin f:/tracsvn/trac.db
    158166}}}
    159167
    16016826. Initialize DB
    161169{{{
    162 Trac [d:/svn/trac.db]> initdb
     170Trac [f:/tracsvn/trac.db]> initdb
    163171}}}
    164172or
    165173{{{
    166 Trac [d:/svn/trac.db]> initenv
     174Trac [f:/tracsvn/trac.db]> initenv
    167175}}}
    168176{{{
     
    170178    Project
    171179  Enter path to repository
    172     d:\svn\repo1
     180    f:\tracsvn\
    173181  Enter path to templates
    174     d:\Python23\share\trac\templates
     182    f:\Python23\share\trac\templates
    175183}}}
    176184
     
    18419228. Add administrative permissions (the below adds all permissions for 'admin' user)
    185193{{{
    186 Trac [d:/svn/trac.db]>
     194Trac [f:/tracsvn/trac.db]>
    187195
    188196permission add admin TRAC_ADMIN
    189197}}}
    190198
    191 === Add Trac to Apache ===
    192 
    193 29. Edit httpd.conf:
    194   Add: (copy this - there's a typo in Edgewall's version)
    195 {{{
    196 # TRAC
    197 Alias /trac "D:/Python23/share/trac/htdocs"
    198 
    199 <Location "/cgi-bin/trac.cgi">
    200   SetEnv TRAC_ENV "d:/svn/trac.db"
    201 </Location>
    202 
    203 <Location "/cgi-bin/trac.cgi/login">
    204   AuthType Basic
    205   AuthName "Project"
    206   AuthUserFile D:/svn/.htaccess
    207   Require valid-user
    208 </Location>
    209 
    210 <Directory "D:/Python23/share/trac/htdocs">
    211   Options Indexes MultiViews
    212   AllowOverride None
    213   Order allow,deny
    214   Allow from all
    215 </Directory>
    216 
    217 
    218 }}}
    219 
    220   Alternatively you could set up the authorisation to use your NT domain login if you are running an NT Domain.  This bit of Apache config replaces the <Location "/cgi-bin/trac.cgi/login"> given above.
    221 {{{
    222 <Location "/cgi-bin/trac.cgi/login">
    223   #NT Domain auth config
    224   AuthType SSPI
    225   SSPIAuth On
    226   SSPIAuthoritative On
    227   SSPIOfferBasic On
    228   AuthName "Project"
    229   Require valid-user
    230 </Location>
    231 }}}
    232   You'll also need the sspi_auth_module on your system and loaded like this...
    233 {{{
    234 LoadModule sspi_auth_module modules/mod_auth_sspi.so
    235 }}}
    236  Or compile it into Apache.
    237 
    238 30. Restart Apache
    239 
    240 31. Hold your breath, test Trac install
    241   http://[hostname]:80/cgi-bin/trac.cgi
    242 
    243   If it doesn't work, then running Apache from the command-line will give you a few clues.
    244 
    245   If your page seems to be lacking stylesheets, you've probably run into a known Apache bug described (and worked around) [http://www.apache.org/dist/httpd/binaries/win32/#xpbug here].
     199Note that if you're using windows authentication with iis6 you can grant permissions to windows users here. Eg.
     200{{{
     201Trac [f:/tracsvn/trac.db]>
     202
     203permission add STAR\Administrator TRAC_ADMIN
     204}}}
     205If your iis server's windows network name is "STAR", or your iis server is in the "STAR" domain.
    246206
    247207=== Finally... ===