Hi,
I am trying to set up a virtual host on my server. I believe I have done everything correctly ... but ...
Here's the entries in httpd.conf
NameVirtualHost 123.123.123.123
<VirtualHost 123.123.123.123>
ServerName 123.123.123.123
DocumentRoot /var/www/html
ErrorLog /var/log/httpd/error__log
CustomLog /var/log/httpd/access_log combined
</VirtualHost>
<VirtualHost 123.123.123.123>
ServerName mydomain.com
DocumentRoot /var/www/html/mydomain
ErrorLog /var/log/httpd/error_mydomain_log
CustomLog /var/log/httpd/access_mydomain_log combined
</VirtualHost>
<VirtualHost 123.123.123.123>
ServerName
www.mydomain.com
DocumentRoot /var/www/html/mydomain
ErrorLog /var/log/httpd/error_mydomain_log
CustomLog /var/log/httpd/access_mydomain_log combined
</VirtualHost>
httpd seems fine with it as when I check it I get this:
apollo.fourkings.com[root]:/var/log/httpd-> httpd -S
VirtualHost configuration:
123.123.123.123* is a NameVirtualHost
default server 123.123.123.123 (/etc/httpd/conf/httpd.conf:976)
port * namevhost 123.123.123.123 (/etc/httpd/conf/httpd.conf:976)
port * namevhost mydomain.com (/etc/httpd/conf/httpd.conf:983)
port * namevhost
www.mydomain.com (/etc/httpd/conf/httpd.conf:990)
wildcard NameVirtualHosts and _default_ servers:
_default_:443 localhost.localdomain (/etc/httpd/conf.d/ssl.conf:86)
Syntax OK
and I have created in index.html in /var/www/html/mydomain
But .... when I access the site via browser on
http://www.mydomain.com, I get the Fedora Core page. Also, nothing goes into the new log files (that the server created), rather the entries go into access_log.
-rw-r--r-- 1 root root 0 Jun 30 17:06 access_mydomain_log
-rw-r--r-- 1 root root 6502280 Jun 30 17:29 access_log
-rw-r--r-- 1 root root 8081 Jun 25 03:09 access_log.1
-rw-r--r-- 1 root root 1966 Jun 19 02:27 access_log.2
-rw-r--r-- 1 root root 0 Jun 30 17:06 error_mydomain_log
-rw-r--r-- 1 root root 2721215 Jun 30 17:29 error_log
-rw-r--r-- 1 root root 0 Jun 30 17:06 error__log
-rw-r--r-- 1 root root 5151 Jun 26 04:02 error_log.1
-rw-r--r-- 1 root root 2316 Jun 19 04:02 error_log.2
Oh--one other thing. The actual IP on the NIC is 192.168.100.3. the 123.123.123.123 IP is on the other side of a linksys router that is forwarding port 80 to 192.168.100.3.
Thanks in advance if you have any ideas.