Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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've installed a phusion-passenger website in Apache2, the site sits at in my network.

here it is the VirtualHost element

<VirtualHost *:80>
        ServerName my_web_host

        DocumentRoot /var/www/redmine
        LogLevel debug
        ErrorLog /var/log/apache2/redmine_error
        CustomLog /var/log/apache2/redmine_access combined

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

now, this is how i have suceeded accessing it so far:

  • to be able to access the site from another machine in the LAN** i need to add my_web_host to my /etc/hosts file and access it from a browser with http://my_web_host

things that annoys me and want to change are that

  • if i access the machine directly with i see a generic message from Apache telling me that 'it works', but i would like it to redirect me to the redmine site if possible

  • totally unacceptable is the fact that if i access the machine with i get to see all the files and folders that actually sit at /var/www/website (which is actually a symbolic link to the redmine public installation folder)

** this is meant as a LAN only website so i really don't care about WAN access,but if you feel like educating me on how to fix this when the website is also accessed over public internet, please by all means, feel free to do so

share|improve this question
up vote 1 down vote accepted

You can set the passenger options for your default document root (should be in /etc/apache2/sites-available/default , depending on your OS) or bind your virtual host to the IP address:

share|improve this answer
will this also avoid showing up the contents of the web folder? what if i access the website using the hostname? will still show up? – lurscher Jun 10 '11 at 18:39
No, the content won't show up anymore, and yes, the hostname will still be valid. – freddy K. Jun 10 '11 at 19:25

Is there a reason you are using name-based virtual hosting? From your description it seems this is your only site being hosted on the server. If this is correct, get the name based virtual hosting out of the equation.

Is there a reason you have to have the website files in /var/www/redmine instead of in the regular apache web folder? If not, put the files in the normal, place (/var/www/html on Redhat systems).

I'm a firm believer in keeping things as simple as possible, and it seems you are adding needless complexity to your setup.


share|improve this answer
the reason i'm using it in this way is that i simply don't know better; i've dragged through couple of guides for redmine setup and i've beated it repeatedly into compliance – lurscher Jun 10 '11 at 13:09

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.