I wanted both Redmine and Mercurial on localhost/redmine and localhost/mercurial.
Redmine is a RoR application that runs on mod_passenger module and mercurial runs on a CGI script. I should be able to use both on a single server right?
I got Redmine to work fine. Then I followed the steps for Mercurial. Then I enabled that site.
And neiter site works. I did a2ensite those two sites and restarted Apache, but both domains now give me a 404.
Site config for redmine taken from http://www.redmine.org/projects/redmine/wiki/HowToInstallRedmineOnUbuntuServer
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
ServerName myservername
RewriteEngine on
RewriteRule ^/$ /redmine [R]
<Directory /var/www/redmine>
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Site config for Mercurial taken from http://www.isnull.com.ar/2010/03/how-to-install-mercurial-on-debian-or.html
<VirtualHost *:80>
Servername mercurial.server
DocumentRoot /var/www/mercurial/http
ScriptAlias /cgi-bin/ /var/www/mercurial/cgi-bin/
ScriptAliasMatch ^/hg(.*) /var/www/mercurial/cgi-bin//hgwebdir.cgi$1
<Directory /var/www/mercurial/cgi-bin>
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/mercurial/http>
Options FollowSymLinks
AllowOverride AuthConfig
DirectoryIndex /hg
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error_mercurial.log
CustomLog /var/log/apache2/access_mercurial.log combined
</VirtualHost>