Re-check configuration throws an Apache virtual host was not found

When checking the configuration I get the following result.

#

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..

Your system has 11.73 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB.

Apache is installed.

The following PHP versions are available : 7.0.8 (/usr/bin/php5-cgi), 7.0.8 (/usr/bin/php-cgi7.0)

PHP versions have changed to 5, 7.0 since last check. Regenerating any missing php.ini files.

Apache virtual host was not found
Status: 
Active

Comments

Howdy -- we may want to verify that your Apache version is what Virtualmin is expecting, and that the config files are in the correct directory.

What is the output of these commands:

dpkg -l apache2
ls /etc/apache2/sites-enabled/
Mostafa's picture
Submitted by Mostafa on Tue, 01/10/2017 - 11:09

Apache virtual host was not found happens when you have a website in /etc/webmin/virtual-server/domains/ that does not exist in apache configs (e.g. may caused by IP/PORT mismatch). You may check your domains there and see what is wrong.

You can discover which domain is missing it's Apache virtual host by SSHing in as root and running :

virtualmin validate-domains --all-domains --feature web

Thanks for your input. I tried the virtualmin validate-domains and found the following errors. The sites it complains about are using the Danish ÆØÅ in the site names. Could that be reason fór the error.

Apache website : No Apache virtual host for xn--sren-gra.el-eux.sde.dk found Apache website : No Apache virtual host for xn--srenelkursus-vjb.el-eux.sde.dk found Apache website : No Apache virtual host for xn--idrtsforeningvestermose-b9b.el-eux.sde.dk found Apache website : No Apache virtual host for xn--blksprutten-b9a.otg.dk found Apache website : No Apache virtual host for aq.dim.sde.dk found Apache website : PHP configuration errors were found in version 5 : Directive 'magic_quotes_gpc' is no longer available in PHP

If you check your Apache config file, is there any entry for xn--srenelkursus-vjb.el-eux.sde.dk or the Danish version of it?

I ended up deleting the sites, but it looked like all sites that had the ÆØÅ in their names had this problem.

That's a pity, I was interested to know what hostname was actually in the Apache config.

Hello, I am running in the same issue, I checked everything that was mentioned above and solved the issues mentioned.

Here is the result of dpkg -l apache2

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                            Version              Architecture         Description
+++-===============================-====================-====================-====================================================================
ii  apache2                         2.4.10-10+deb8u7     amd64                Apache HTTP Server

virtualmin validate-domains --all-domains --feature web shows all ok now but I still get the "Apache virtual host was not found" when re-checking the configuration. Any idea of what might go wrong?