I am trying to create a trac installation on my private server in order to use it for project management. I followed the instructions for installation and connecting to the apache server that can be found at the official trac installation guide but when I try to access trac I get error 404. When I disable ScriptAlias, I get 403 Access Denied. Here are the details:
My setup is like that: ArchLinux i686 running in headless mode (I connect to it via ssh) and connected wirelessly to my home network's router. I chose to connect trac and apache with FastCGI
A trac user to contain everything trac related.
$ sudo ls /home/trac cgi-bin env htdocs
env is where the projects are located
cgi-bin and htdocs were generated with the
trac-admin $TARGET $DESTINATION deploy command.
A httpd user to contain the DocumentRoot for the apache server:
$ sudo ls /home/httpd ftp http
I gave ownership to everythin in /home/trac, recursively, to httpd and the http group (insecure, I know, but I wanted to test it out first in the simplest way possible):
sudo chown -R http.httpd /home/trac
I made the following modifications to httpd.conf:
LoadModule fcgid_module modules/mod_fcgid.so
User httpd Group http
Changed DocumentRoot to this everywhere:
And finally I enabled virtual hosts:
# Virtual hosts Include conf/extra/httpd-vhosts.conf
Here is the httpd-vhosts.conf:
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org DocumentRoot "/home/trac/" ServerName SERVER_IP ErrorLog "/var/log/httpd/trac.error.log" CustomLog "/var/log/httpd/trac.access.log" combined <Location /> Order deny,allow Deny from all Allow from 192.168.0.0/16 127.0.0.1 </Location> <Location /env> Order deny,allow Allow from all AuthName "Trac Projects" AuthType Basic AuthUserFile /home/trac/.htpasswd Satisfy Any Require valid-user </Location> ScriptAlias /env /home/trac/cgi-bin/trac.fcgi
Note that I have made the trac.fcgi owned by http as well as explicitly set the permissions ot make it executable.
When ScriptAlias is commented, I get 403 Access Denied for the root, SERVER_IP, as well as SERVER_IP/env or any other directory in the path. When the line is not commented, I get 403 Access Denied for the root and 404 Object Not Found for everything else.
The sources that I used to arrive at this point are first the tracinstall guide and then the outdated arch linux install guide when the first one did not work (produced the same results that I am describing, only I was able to arrive at the dummy page in the DocumentRoot, and even with the script alias enabled the SERVER_IP/env was Access Denied 403). Here is the httpd.conf as it is way too big to post here: httpd.conf
I think that this is a permission problem but my because of my limited experience with apache I cannot seem to reach a solution.
Thanks in advance.
P.S. Since I am controlling the whole thing through ssh, logged in as a different user, I had to give httpd ownership of its http and ftp directories after I created them. I am not sure if this matters though.