Edgewall Software

Changes between Version 1 and Version 2 of TracApacheRecipe


Ignore:
Timestamp:
Mar 7, 2006, 3:16:55 AM (18 years ago)
Author:
byrnejb@…
Comment:

Updated authentication information

Legend:

Unmodified
Added
Removed
Modified
  • TracApacheRecipe

    v1 v2  
    1010Next, there is the issue of permissions on both the trac environment and the subversion repository.  Afer several takes on this I came to the conclusion that it would be best to create separate users and groups for trac and subversion called, originally enough, trac:trac and svn:svn.  I then set the ownerships on the trac environment and subversion repositories to trac:trac and svn:svn respectively.  I next added the apache user as a member to both the trac and svn groups.  This allows apache to read the files in both these directory structures.
    1111
    12 The final bit is to create a file called something like '/etc/httpd/conf.d/trac.conf' and place your httpd directives for trac and python in it.  In my case I set up a virtual server called trac.mydomain.tld and put the following lines in a file called '/etc/httpd/conf.d/trac.mydomain.tld.conf'. Note that the trac environment is located at '/var/data/trac'
     12The final bit is to create a file called something like '/etc/httpd/conf.d/trac.conf' and place your httpd directives for trac and python in it.  In my case I set up a virtual server called trac.mydomain.tld and put the following lines in a file called '/etc/httpd/conf.d/trac.mydomain.tld.conf'. Note that the trac environment is located at '/var/data/trac' and that instead of htpasswd I use htdigest and lock down the entire tac environment from anonymous access.
    1313
    1414
    1515{{{
    1616<VirtualHost *>
     17
    1718DocumentRoot "/var/data/trac"
    1819ServerName trac.mydomain.tld
     
    2829   PythonOption TracUriRoot /
    2930 </Location>
    30  <Location "/conf">
    31    AuthType Basic
     31 <Location "/">
     32   AuthType Digest
    3233   AuthName "tld.mydomain"
    33    AuthUserFile /var/data/trac/conf/trac.htdigest
     34   AuthDigestDomain /
     35   AuthDigestFile /var/data/trac/conf/trac.htdigest
    3436   Require valid-user
    3537 </Location>
     38
    3639</VirtualHost>
    3740}}}
    3841
    39 The !AuthName directive refers to the realm used when creating the htdigest file for user authentication. I had to create the egg.cache inside the trac enviroment to avoid permission problems in the /var/www/htdocs directory.   The '!TracUriRoot /' is required so that trac can find its support files like stylesheets and plugins, '/' in this case equates to '/var/data/trac'. The user password file is created with the htdigest(1) program.
     42I had to create the egg.cache inside the trac enviroment to avoid permission problems in the /var/www/htdocs directory.   The '!TracUriRoot /' is required so that trac can find its support files like stylesheets and plugins, '/' in this case equates to '/var/data/trac'.
     43
     44The !AuthName directive refers to the realm used when creating the htdigest file for user authentication. the !AuthDigestDomain sets the uri covered by controlled access, '/' means the entire site is closed to public view. The user password file is created in '/var/data/trac/conf/trac.htdigest' with the htdigest(1) program.
    4045
    4146This set up does not yet employ cgi or fastcgi so it will be slow.  When I get to the point of using mod_fcgid then "I'll be back" with the details.