-----???????? ?????????-----
??: "Eric Anderson" <[EMAIL PROTECTED]>
????: "Trac Users" <[email protected]>
??????????: 28.06.07 5:55
????: [Trac] Installing Trac using FastCGI in a shared hosting environment


Not sure if this is the right place to post a installation question so
please tell me where to post if this is the wrong place.

I am trying to install the latest stable version of Trac on my shared
hosting environment (Site5 to be specific). My basic steps were:

1. Download Trac
2. Run the install with the --prefix option to install in a directory
I can manage
3. Download ClearSilver
4. Install with the --prefix option to install where I desire
5. Create a Trac environment for my project

Now at this point I can run tracd and I have a working installation of
Trac. But I would like to make trac use Apache/FastCGI instead of
tracd but at least I know it is basically working. I'm attempting
plain CGI first before I throw in FastCGI to the mix.

To get tracd working all I had to do was update my PYTHONPATH to
include the libraries installed for trac and update my LD_LIBRARY_PATH
to include the ClearSilver libraries. So my assumption is the CGI
needs the same environment variables set so it can find the necessary
libraries. So I my next steps are:

1. Symlink the directories my webserver looks loads to the htdocs and
cgi-bin directory in trac. That way the resources and scripts are
available.
2. Create a .htaccess file that looks like the following so that
trac.cgi is always run unless a resource requested exists:

###################
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ cgi-bin/trac.cgi [QSA,L]
###################

The .htaccess file was mostly borrowed from the way rails redirects to
it's dispatch file. This may be overkill and I may just need to
redirect a request for / to cgi-bin/trac.cgi.

3. Added the following to start of trac.cgi so the environment
variables are set right:

######################
import os
os.environ['LD_LIBRARY_PATH'] = "/home/pix/lib/clearsilver/lib"
os.environ['PYTHONPATH'] = "/home/pix/apps/trac/lib/python2.4/site-
packages:/home/pix/lib/clearsilver/lib:/usr/lib/python2.3/site-



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to