I was trying a few thing for a custom "default" Apache vhost and nothing seemed to work, I always got the /var/www/html/index.html
served instead of other contents or errors I wanted to display.
But the most bizarre thing: every access log got recored into /var/log/apache2/other_vhosts_access.log
instead of /var/log/apache2/access.log
.
I tried resetting my install by removing completly Apache (not sure if this was enough)...
systemctl stop apache2
apt-get remove --purge apache2
rm -rf /etc/apache2
rm -rf /var/log/apache2
rm -rf /var/www/html
deluser --remove-home www-data
apt autoremove
... then reinstalling it and only changing the port (because I use nginx as a reverse-proxy):
apt install apache2
sed -i 's/Listen 80/Listen 8080/' /etc/apache2/ports.conf
So I now have only one existing vhost presnt on this install: 000-default.conf
(in its original state) and it is active (checked apache2ctl -S
).
And even after that, any call to my webserver is still rerouted by nginx to Apache (that's OK) that still logs anything to /var/log/apache2/other_vhosts_access.log
, which indicates (to my understanding) that the vhost is not trigger by Apache (that's not OK).
Isn't it a "catchall" vhost, that should be trigger by any Host
header sent to it? Why woulnd't it be trigger in this case?
I tested a bit with apache2.conf
's LogLevel debug
and looked into /var/log/apache2/error.log
and /var/log/syslog
, but I didn't see anything that seemed releven (I can still post the whole thing if any of you think it might help).