Hi there, I have a Ubuntu 16.04 server with ISPConfig 3.1.15p3 and some 200+ virtual hosts. This week I added a new website and it's behaving very strange: When I visit the site, I *sometimes* get the correct site, *sometimes* either a 500 or 503 error and *sometimes* I get the contents of the _default_ virtual host. It would be quite an easy problem if it'd *always* load the default site, although weird, because it's a basic virtual host with no special options or redirects or something. It's as if the Host header is missing some of the time... *every* other site on the server is working fine, but every new website I add is behaving this way, even if I create it manually in stead of via ISPConfig. The log files show nothing out of the ordinary: when the wrong vhost is served, the corresponding log files are used with normal lines as if I intended to visit that site. Has anyone any idea where I could start looking?
it is possible that between various reloads and restarts that you have multiple instances of apache2 running, each one with a slightly different list of active vhosts, and sometimes your connection goes to one of these alternative instances. i know this is possible because i've experienced it, and it was extremely confusing at the time. try stopping the apache service, and then check with ps to see if any apache processes are still running, if there are kill them all, until Code: ps -aux | grep apache doesn't show any running instances, and then restart apache. alternatively, and a bit more drastically, restart your server... then see if the problem still exists.
That sounded too simple to be true and too weird to be possible, but there appeared to be 3 apache root processes. Stopping apache with systemctl or apache2ctl only affected one process, so I killed the others. Everything is working fine again! Thanks!
Good grief. I would not have thought something like that could happen. Just goes to show suspect everything.