Installing Trac on Virtual Host

Discussion in 'General' started by PavementPounder, Oct 11, 2009.

  1. PavementPounder

    PavementPounder New Member

    Hi,

    I have a working trac environment, so when I go to http://www.victorycms.org/cgi-bin/trac.fcgi I see the trac interface as expected. But I want it so that if I go to http://www.victorycms.org/ then it right away goes to the trac interface without the /cgi-bin/trac.fcgi part of the url.

    The trac environment is located at /var/www/web3/trac.

    Here is the optional apache directives i put for the website:
    Code:
    <Location />
            SetHandler mod_python
            PythonInterpreter main_interpreter
            PythonHandler trac.web.modpython_frontend
            PythonOption TracEnv /var/www/web3/trac/
            PythonOption TracUriRoot /
            PythonOption PYTHON_EGG_CACHE /var/www/web3/egg-cache  
    </Location>
    
     
  2. PavementPounder

    PavementPounder New Member

    Solved

    I had it working a while back and thought I'd answer my own thread. It turned to be another issue with the virtual hosts file not being written. Anyways here is the custom apache directives I used.

    Code:
    <IfModule mod_wsgi.c>
        <Directory /var/www/web3/cgi-bin>
    	Options ExecCGI MultiViews
    	MultiviewsMatch Handlers
    	AddHandler wsgi-script .wsgi
        </Directory>
        WSGIScriptAlias / /var/www/web3/cgi-bin/trac.wsgi
        PythonOption TracEnv /var/www/web3/victorycms_trac
        PythonOption TracUriRoot /
        PythonOption PYTHON_EGG_CACHE /var/www/web3/egg-cache
    </IfModule>
    <IfModule mod_env.c>
        <Location "/">
    	SetEnv PYTHON_EGG_CACHE /var/www/web3/egg-cache
    	SetEnv TRAC_ENV /var/www/web3/victorycms_trac
        </Location>
    </IfModule>
    <IfModule mod_auth_digest.c>
        <Location "/login">
    	AuthType Digest
    	AuthName "victorycms-trac"
    	AuthDigestDomain http://www.victorycms.org/login/
    	AuthUserFile /var/www/web3/.trac-htpasswd
    	Require valid-user
        </Location>
    </IfModule>
    
     

Share This Page