Hi Folks,
After spending a lot of time searching the forum I didn´t find a solution for my problem.
I found, where the problem is, but not how to fix it:
Problems: The default Apache page seems to be the domain alphabetically first on the list of "sites-available" and not the default page.
Therefore every error happening on apache points to a certain domain/supdomain "aaaaa.aaaaa.com" (anymistake.bbbb.com) points to "aaaaa.aaaaa.com", which is no good at all.
Ronald mentioned the problem already, but I couldn´t find the solution to the problem.
Goal: -In case of errors/mistakes, the default mach should be "default" an not the 1. domain listed on "sites-available" -That all traffic coming in on a certain domain stays at the domain (virtual server).
facts: apache2/sites-enabled/000-default apache2/sites-available/default
Would a rename of apache2/sites-available/default to "000-default" fix the problem? This way, 000-default would be the 1st in line...
If this would work, what do I need to do?
I want to avoid to create 0000.com and then create a subdomain: 0000.0000.com on my server which would be maybe a workaround.
This problem afects subservers, subdomains and even domains...
Thank you in advance for your opinion on this.
<div class='quote'>The default Apache page seems to be the domain alphabetically first on the list of "sites-available" and not the default page.</div>
There is no such thing as a "default" page in an VirtualHost configuration in Apache. The "default" is the "first best match" based on name:IP:port order in the request.
<div class='quote'>Would a rename of apache2/sites-available/default to "000-default" fix the problem? This way, 000-default would be the 1st in line...</div>
Yes. Though again, beware that Apache does first bast matching...and there is no such thing as "default". If you have multiple IPs, you can easily confuse yourself about what's supposed to happen.
The ideal is to never expect "default" behavior in a virtual hosting system. e.g. use names exclusively for accessing your server. Names are completely predictable in a virtual hosting Apache configuration.
--
Check out the forum guidelines!