Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to apache2 and passenger to set-up rails apps and followed a tutorial on how to get redmine (rails app) set up (

It all works great but to access the app you need to go to the /redmine directory. I have set it up as redmine.local/redmine. It would be great if I could be just redmine.local.

I had a look through the files I set up as part of the apache/mongrel/passenger piece and took out references to the directory but alas its never that easy.

I would appreciate any assistance, or links to more information for beginners that I can learn from.

Thanks for your help! Adam

--- Updated ---

Some additional details, I have the following files which i made edits too as part of the set-up of the server:


 Include /opt/redmine/apps/redmine/conf/redmine.conf


 ProxyPass /redmine balancer://redminecluster
 ProxyPassReverse /redmine balancer://redminecluster

 <Proxy balancer://redminecluster>
   Order deny,allow
   Allow from all


 prefix: /redmine
 log_file: log/mongrel.log
 port: "3001"
 environment: production
 pid_file: tmp/pids/
 servers: 2


 <VirtualHost *:80>
    ServerAdmin webmaster@localhost

 <Directory /var/www/>
    Options FollowSymLinks
    AllowOverride None
 <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
 <Directory /var/www/usr/lib/cgi-bin>
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all

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

Alias /doc/ "/usr/share/doc/"
 <Directory /var/www/usr/share/doc/>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from ::1/128
 DocumentRoot /var/www


I can't find a file that references the current directory /redmine as a route so not sure the server finds it in the first place - unless its that conf.d thing.

share|improve this question
what does your apache config look like? – luckytaxi Oct 31 '11 at 15:00
How would i find that out? I'm using webmin for a lot of this (cheating I know) to avoid being stuck by lack of command knowledge. – Adam Oct 31 '11 at 20:29
@luckytaxi - I've added the file details I could find the original question. – Adam Oct 31 '11 at 23:06
up vote 2 down vote accepted


  1. Edit the redmine.conf file to the belows content:

    <VirtualHost *:80>
        ServerName redmine.local
        ErrorLog logs/redmine_error_log
        RewriteEngine On
        RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
        RewriteRule ^/(.*)$ balancer://redminecluster%{REQUEST_URI} [P,QSA,L] 
        <Proxy balancer://redminecluster>
  2. Remove the prefix option from mongrel_cluster.yml.

  3. Restart Apache and try again.

share|improve this answer
I tried putting just this in my virtual host file but apache woudn't start. I tried adding it via webmin and it links to the directory but just displays the directory content - it doesn't recognize it as an app. – Adam Oct 31 '11 at 22:50
okay, i updated the redmine.conf, and the mongrel_cluster file. I wasn't sure what you wanted me to do with your original suggestion of the virtual host, so I tried adding that to the end of the default file in the available sites directory. That didn't work, so I tried deleting everything in that file and just having what you had above, that didn't work, then I tried integrating the two - which failed. I update the dir in the virtual host you game me above as my rails app is in /opt/redmine/apps/redmine/public but that didn't seem to help. – Adam Nov 1 '11 at 4:17
updated my answer. – quanta Nov 1 '11 at 4:34
I get the following error when trying to restart apache: Syntax error on line 5 of /opt/redmine/apps/redmine/conf/redmine.conf: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration – Adam Nov 1 '11 at 15:06
It means that you haven't loaded the mod_rewrite module. – quanta Nov 1 '11 at 15:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.