|
In the ~/www/myproject/ directory, create an .htaccess file
specifying
your authentication policy. It is possible to limit access based on passwords,
client IP addresses, etc.
See the htaccess howto and
Apache documentation
for more details.
For basic password authentication, one would use:
AuthType Basic
AuthName "Trac"
AuthUserFile /home/yourname/.htpasswd-myproject
Require valid-user
DirectoryIndex index.cgi
The Trac FastCGI script (installed in /var/www/trac/cgi-bin),
should be invoked with the TRAC_ENV environment variable set as the path
name to the Trac environment.
Create a new file named index.fcgi in your ~/www/myproject/,
containing:
#!/bin/sh
TRAC_ENV="/home/yourname/www/myproject"
export TRAC_ENV
exec /var/www/trac/cgi-bin/trac.fcgi
Finally, give the script execute permissions and trac should become
accessible from the web.
$ chmod 700 ~/www/myproject/index.fcgi
Note that the FastCGI mode of Trac can require heavy server resources, which
may not be available based on your current hosting package. You can
always monitor your process usage with top and see from your error
logs whether your trac instances are running into resource limits.
If there are problems related to the FastCGI method, you can also execute
Trac as traditional CGI by substituting trac.fcgi for
trac.cgi, and renaming your index file with the .cgi suffix.
|