Ticket #290 (closed enhancement: worksforme)
Simplified Multiple Project setup.
| Reported by: | anonymous | Owned by: | jonas |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | general | Version: | 0.6.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by daniel) (diff)
I had to do some fancy rewrites and such to get trac to work on multiple projects without a bunch of hassle.
URLS are http://ip/projects/PROJECT NAME.
My trac.conf for apache It allows me to use the same trac.cgi to run all the projects. the projects.php just does a simple dir of my svn directory and pulls all the project names and links them.
This way if someone goes to http://ip/projects/ they get a list of projects they can go to.
The last trick would be to somehow automate/get rid of the specific project area so as long as there is a proper database file in the correct location you can load a project without having to edit and restart apache.
Alias /trac/ "/usr/share/trac/htdocs/" RewriteEngine? on Rewriterule /projects/(.*)/ - [L] Rewriterule /projects/ /var/www/html/trac/projects.php <Directory /var/www/html/trac/> AllowOverride? None Options +ExecCGI FollowSymLinks? Order allow,deny Allow from all </Directory> AddHandler? cgi-script cgi ## CYBERLOT PROJECT ## Alias /projects/cyberlot "/var/www/html/trac/" <Location "/projects/cyberlot/trac.cgi">
SetEnv TRAC_DB "/usr/share/trac/cyberlot.db"
</Location> <Location "/projects/cyberlot/trac.cgi/login">
AuthType? Basic AuthName? "Cyberlot" AuthUserFile? /svn/config/passfile Require valid-user
</Location>


