I have a fedora server and Windows XP machine behind a router on my home network. I'm using this set up to learn to build a server.
I want to use Apache to run 2 servers. The first uses the main config file, httpd.conf, and runs on port 80. This server works fine. It servers up the index file just fine.
I want to use a <VirtualHost 192.168.0.2:81> directive for the second server, so I can have it listen on port 81. So far it has not worked. The error log I put in the Virtual Host did not show any errors as far as I could tell.
Both servers listen on 192.168.0.2
Port 81 is open in iptables
The main server, httpd.conf port 80, responds to all requests for the index file listed in it's "DirectoryIndex" directive.
The virtual host does not serve the file listed in it's "DirectoryIndex" File.
The same file that is served on port 80 (httpd.conf) is not served on port 81 (virtualhost>.
I can call the main server by domain name or ip. Both work
I call the virtual host by 192.168.0.2:81 , because I have no ServerName Directive on this port.
Use Canonical Name On
Options Indexes FollowSymLinks
Order allow, deny
Allow from all
DirectoryIndex registration.html (this file served fine)
The Virtual Host
(DocumentRoot in httpd.conf had quotes around it. I put them around this line as well. It didn't fix it.)
DirectoryIndex registration.html (this same file not served when placed here)
(This file is not served. This same file in httpd.conf directory index is served fine)
Does anyone know what I'm missing? Thank you
UPDATE: Apache will not start when Listen directive in httpd.conf set to port 80.