i've installed a phusion-passenger website in Apache2, the site sits at 192.168.0.50 in my network.
here it is the VirtualHost element
<VirtualHost *:80>
ServerName my_web_host
DocumentRoot /var/www/redmine
ServerAdmin [email protected]
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
</Directory>
</VirtualHost>
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 withhttp://my_web_host
things that annoys me and want to change are that
if i access the machine directly with
http://192.168.0.50/
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 possibletotally unacceptable is the fact that if i access the machine with
http://192.168.0.50/redmine
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
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:
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.
Bart.