DevHeads.net

Reply to comment

Re: Strrange behavior of VirtualHosts in Apache (CentOS

By Joseph L. Casale at 11/13/2017 - 09:54

That page has not been updated since 2009, while it may be correct
there is no reason not to use the correct documentation, the section
of interest is short: <a href="https://httpd.apache.org/docs/2.4/vhosts/name-based.html" title="https://httpd.apache.org/docs/2.4/vhosts/name-based.html">https://httpd.apache.org/docs/2.4/vhosts/name-based.html</a>

So this becomes your default vhost when a match is not found and explains
why the php file is invoked when the order of specificity falls through.

Do you have the correct ip address in your vhost config? I would
bet if you read the log, you will see what is happening and how it differs from
what you expect.

Some more in-depth details at <a href="https://httpd.apache.org/docs/2.4/vhosts/details.html" title="https://httpd.apache.org/docs/2.4/vhosts/details.html">https://httpd.apache.org/docs/2.4/vhosts/details.html</a>

Reply