I've been trying to get my head around this all night with no success no matter how many tutorials and resources I've looked through.
My aim is to be able to go to two different websites on the one running apache server.
End goal is something like this(using local ip);
192.168.1.8/site1 -> first site 192.168.1.8/site2 -> second site
I have included the following in my httpd.conf
<VirtualHost *:80>
DocumentRoot "/root/sites/site1"
ServerName site1
</VirtualHost>
<VirtualHost *:80>
ServerName site2
DocumentRoot "/root/sites/site2"
</VirtualHost>
Its worth mentioning that the default DocumentRoot and Directory settings are still in the http.conf and actually point to the site1 files.
Going to 192.168.1.8 takes me to site1 (guessing from the DocumentRoot settings in the http.conf)
Going to /site1 or /site2 both give me a 404 Not Found
I've run -S to see any problems but it looks good as far as I can tell;
VirtualHost configuration:
*:80 is a NameVirtualHost
default server site1 (/usr/local/etc/apache24/httpd.conf:244)
port 80 namevhost site1 (/usr/local/etc/apache24/httpd.conf:244)
port 80 namevhost site2 (/usr/local/etc/apache24/httpd.conf:248)
ServerRoot: "/usr/local"
Main DocumentRoot: "/usr/local/www/apache24/data"
Main ErrorLog: "/var/log/httpd-error.log"
Mutex default: dir="/var/run/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www" id=80
Group: name="www" id=80
Can anyone spot anything obvious that I have missed?