Changes between Version 1 and Version 2 of TracApacheRecipe
- Timestamp:
- Mar 7, 2006, 3:16:55 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracApacheRecipe
v1 v2 10 10 Next, 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. 11 11 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' 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' and that instead of htpasswd I use htdigest and lock down the entire tac environment from anonymous access. 13 13 14 14 15 15 {{{ 16 16 <VirtualHost *> 17 17 18 DocumentRoot "/var/data/trac" 18 19 ServerName trac.mydomain.tld … … 28 29 PythonOption TracUriRoot / 29 30 </Location> 30 <Location "/ conf">31 AuthType Basic31 <Location "/"> 32 AuthType Digest 32 33 AuthName "tld.mydomain" 33 AuthUserFile /var/data/trac/conf/trac.htdigest 34 AuthDigestDomain / 35 AuthDigestFile /var/data/trac/conf/trac.htdigest 34 36 Require valid-user 35 37 </Location> 38 36 39 </VirtualHost> 37 40 }}} 38 41 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. 42 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'. 43 44 The !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. 40 45 41 46 This 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.