I have an Apache server in an local Ubuntu 18.04 test environment. In /var/www
I have the folders html
containing the default site and wordpress
containing a Wordpress installation. I created a virtualhost for Wordpress and disabled the default site:
$ ll /etc/apache2/sites-enabled/
total 8
drwxr-xr-x 2 root root 4096 Feb 24 15:47 ./
drwxr-xr-x 8 root root 4096 Feb 24 15:55 ../
lrwxrwxrwx 1 root root 33 Feb 18 21:49 wordpress.conf -> ../sites-available/wordpress.conf
The Wordpress virtualhost looks as follows
cat /etc/apache2/sites-available/wordpress.conf
<VirtualHost localhost:8000>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/wordpress
ErrorLog ${APACHE_LOG_DIR}/wp-error.log
CustomLog ${APACHE_LOG_DIR}/wp-access.log combined
</VirtualHost>
and the ports as follows
cat /etc/apache2/ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 8000
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
After all these changes I restarted the apache. When I call localhost:8000
in Firefox it displays the Wordpress instance as expected. When I call it within Chromium it displays the default page from /var/www/html
. I deleted all caches in Chromium and even reinstalled it - still the same result.
Even when I change the default page these changes are reflected in the Chromium output, so this is not just a caching issue.
How the heck can Chromium see a disabled virtualhost on a port a different virtualhost should be shown? Especially since everything works fine with Firefox?
Just checking that port 8000 is not used anywhere else...
$ grep -rnw '/etc/apache2/' -e '8000'
/etc/apache2/ports.conf:5:Listen 8000
/etc/apache2/sites-available/wordpress.conf:1:<VirtualHost localhost:8000>
I'm really confused. Would be great if someone could help.