"website disabled", even after enabling server


I disabled a server few days ago via “Disable and Delete” menu.
Then, I enabled it after several hours.

Now the server still gives “website disabled”, and there’s no option to enable the server.

Webmin show no logs,
Apache logs are the last from when that server was enabled,
and there’s no hint about what went wrong ot how to enable it

I’ve seen a similar message on this forum (not exactly the same),
but that user gave up eventually and recreated the website, which i’d rather avoid (it’s a several GBs website, and is very sensitive to everything)

Is it a bug?
Undocumented feature?
How can I debug it?

Webmin version 1.660
Virtualmin version 4.04.gpl GPL
Theme version 8.7
Kernel and CPU Linux 3.11.6-x86_64-xxxxx on x86_64

Thank you

If I recall correctly, when disabling the site, Virtualmin replaces the “DocumentRoot” directive of the Apache virtual host with a directory where the “disabled” HTML resides. That, or it uses some redirect commands.

You might want to compare the virtual host of your incorrectly disabled site with a regular one, find out the differences and fix the incorrect bits manually. Or, you could try disabling the site a second time and re-enabling it, and see what happens.

solution at the end;
here are the details:

docuemtnRoot is pointing to my website (i.e. /home/mywebsite/www)

there are few redirects inside the particular mywebsite.conf, but they deal with other ports (i.e. 20000 and 10001)

i checked also .htaccess. my htaccess is huge, (wordpres with a bot prevention rules) but the word “disabl” isnt found there, and nothing that looks suspicious.

in virtualmin, under “Website Redirects”, there’s nothing: “No website redirects have been defined yet”

Then, as you suggested,
I tried to disable the disabled website. After disabling again, i did find a new entry under “Website Redirects”:

Website redirect or alias details
Source URL path : ^/
Directory on this system /etc/…
Include sub-paths in redirect? Yes

And then I enabled the site again,
the website redirect rule disappeared (and so the instruction
but the website is still showing the error message.

I tried to manually restart apache, and there was an error!
(it was in a config file somewhere)
i fixed the config error, THEN restarted apache, and the site FINALLY WORKED.

It is wierd because it means that apache didn’t restart well, and virtualmin maybe should;'ve caught that… strange.

anyway, thanks.

Oh, that’s interesting. Maybe you could post what error exactly there was in the Apache config. I suppose the developers here would like to know, maybe there’s some bug in the code.

Normally Virtualmin does catch Apache config errors when it needs to restart it, but maybe not during the en/disable function, where it assumes that the config was working before, and should still be correct after it did its changes.

The error was actually in ANOTHER virtual-server, so it’s a bit strange, but unrelated to Virtualmin.

The apache-restart error was:

Warning: DocumentRoot [/home/notmywebsite/www] does not exist
Syntax error on line 20 of /etc/apache2/sites-enabled/notmywebsite.com.conf:
Wrapper /home/notmywebsite/fcgi-bin/php5.fcgi cannot be accessed: (2)No such file or directory
Action ‘configtest’ failed.
The Apache error log may have more information.

The errors came from the FCGIWrapper lines:

<Directory /home/notmywebsite/www>
FCGIWrapper /home/notmywebsite/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/notmywebsite/fcgi-bin/php5.fcgi .php5

After commenting out these FCGI lines, apache restarted OK.

(Fortunately, the reason why these files were missing in the first place is not related to Virtualmin)

There is still weird behaviour around this issue, “Website Disabled”.

When you disable a server (depending on setup) a html file is move into your root folder called “disabled by Virtualmin”. This file is not always deleted when the website is re-enabled (or even created).

If you have some servers disabled when a new server is created and you have a error in your apache then there are no warnings, just the message “Website Disabled”.

I can’t reproduce the bug, hence the forum post rather than bug report.