Matthew Gillen wrote:
Brad Fuller wrote:
Matthew Gillen wrote:
Brad Fuller wrote:
I've googled for this and can't find the answer. I would think this
would be a common config, but so far have found nothing. Apologies if
it's out there and I just haven't found it yet.
I would like to set up multiple, separate projects thru a virtual host
that uses a specific port. Can that be done?
I don't see why not. See
http://projects.edgewall.com/trac/wiki/TracModPython
(the "Setting up multiple projects" section)
You can use the Location directive specified within a Virtual Host.
Ok, how do you use a location directive specific to a virtual host? Can
the <Location> directive be _inside_ the <VirtualHost> directive? I
thought it had to be outside.
The link above to the Trac Guide has an example:
---------------------
Virtual Host Configuration
Below is the sample configuration required to set up your trac as a virtual
server (i.e. when you access it at the URLs like http://trac.mycompany.com):
<VirtualHost * >
DocumentRoot /var/trac/myproject
ServerName trac.mycompany.com
<Location />
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/trac/myproject
PythonOption TracUriRoot /
</Location>
<Location /login>
AuthType Basic
AuthName "MyCompany Trac Server"
AuthUserFile /var/trac/myproject/.htusers
Require valid-user
</Location>
</VirtualHost>
Thanks for the help, I appreciate it. Here's what I've tried that
doesn't work:
<VirtualHost *:8000>
DocumentRoot /var/trac
ServerName my.domain.com
<Directory />
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/trac
PythonOption TracUrlRoot /
</Directory>
<Location /project>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/trac/project
PythonOption TracUriRoot /var/trac <--- tried
removing option- didn't help
</Location>
</VirtualHost>
/var/trac is just an empty dir
/var/trac/project is a trac enabled project
svn is at: /var/svn/project
If I try to access: http://my.domain.com:8000/ or
http://my.domain.com:8000/project I get internal server error 500.
tried removing, butdidn't help
PythonOption TracUriRoot /var/trac
If I change DocumentRoot to /var/trac/project it works.
But, of course, then I wouldn't be able to have multiple projects.
Note that I have several <VirtualHost *:80> above this.
|
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac