I have been trying to get this work for hours now. I am trying to set up virtual hosts with Apache on my VPS.
I have the following virtual host file in my sites-available folder :
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/domain.ie
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/domain.ie>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
I have issued the a2ensite domain.ie command on the virtual host.
I have also issued the restart and reload commands. I have also stopped the Apache server and started it, using both commands, to see if Apache is in fact restarting, and it is. I have also restarted the VPS box completely.
The document root folder does exist, but the apache service still serves up the default apache page. I would prefer not to disable the default virtual host.
Am I missing a step here? Should I be adding something to my hosts file in /etc/hosts? domain.ie has been added there by apache : 127.0.0.1 localhost.localdomain localhost domain.ie
Any help on this would be greatly appreciated.