Tuesday, October 28th, 2008 | Author: Aleks

One thing I’ve noticed about tutorials regarding the config of apache towards trac in a plesk environment are rather lacking. I’ll use this short guide to show an easy method of adding the plesk interface as a python module of apache.

The installation of trac is an easy if you got the correct access. Anyhow will I not go through the install process in this guide, but you can find a tutorial on doing that at the trac home page.

When you got plesk installed you should have  you subdomains as virtual hosts. This should be installed automatic from your plesk admin panel.

Lets say your site is named example.tld and your subdomain named trac.

Site name: example.tld
Sub domain: trac

Now log into a SSH client and navigate to the trac subdomain folder

# cd /var/www/vhosts/example.tld/subdomains/trac/

As we just can’t put the project files from trac into the htdocs folder just make a project in this folder so you got a sub folder “project” in the trac directory (or another place).

When you’ve got your project folder in place you are ready to setup the trac for your subdomain. In the subdomain folder locate the folder “conf”. This folder will locate a file that extend the apache configuration, vhost.conf – If not, vi will create it

#vi vhost.conf

Not much configuration necessary here. Add this information (replace the example.tld and path with your environment. And myproject with your project folder for the www-path)

<Location /myproject>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/www/vhosts/example.tld/subdomains/trac/project/
PythonOption TracUriRoot /myproject
SetEnv PYTHON_EGG_CACHE /tmp/cache
</Location>

Now restart the apache web server and you are good to go

#service httpd restart
or
#/etc/rc.d/httpd (or apache) restart

Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter
Category: linux
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response

  1. Hi, cool post. I have been wondering about this topic,so thanks for writing.

Leave a Reply