Categories
Mastering Development System & Network

Apache HTTP Server 2.4.41 is confusingly serving virtual host pages

My httpd-vhosts.conf looks like this: <VirtualHost *:80> DocumentRoot “C:/Apache24/htdocs/rodde.net” ServerName rodde.net ServerAlias www.rodde.net </VirtualHost> <VirtualHost *:80> DocumentRoot “C:/Apache24/htdocs/coderodde.net” ServerName coderodde.net ServerAlias wwww.coderodde.net </VirtualHost> My C:Windows\System32\drivers\etc\hosts contains: 127.0.0.1 localhost 127.0.0.1 www.coderodde.net 127.0.0.1 www.rodde.net 127.0.0.1 rodde.net 127.0.0.1 coderodde.net My C:\Apache24\htdocs\rodde.net\index.html contains: <html> <body> <h1> rodde.net works! </h1> </body> </html> My C:/Apache24/htdocs/coderodde.net/index.html contains: <html> <body> <h1> coderodde.net works! […]