Disable Apache Host but leave everything else (emails etc) as is

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.6
Webmin version 2.111
Virtualmin version 7.10.0
Webserver version 2.4.41
Related packages SUGGESTED

One of my virtual hosts is using up 100% CPU slowing down all other websites.
Htop shows multiple php-cgi-7.4 processes for this old website.
When I disable the virtual host CPU goes down to single digits. However this disables also email delivery for that domain which is needed.

Is there a quick way from within virtualmin to only disable the apache service for this virtual host until I find the actual problem with the website?

Thanks!

BTW, I thought of renaming the virtual link for this host inside /etc/apache2/sites-enabled, and restarting/reloading Apache.
I do not know if this is the right way of going about this though.

The right solution is to fix whatever is wrong. Probably an old unmaintained web application that has been exploited to send spam or mine cryptocurrency or whatever the evil du jour is.

But, have you tried just turning off the Apache Website (and maybe Apache SSL Website if you have it) features?

That will eventually break other services, if you are using a Let’s Encrypt cert for that domain for some services, since without a website, you can’t validate a Let’s Encrypt cert. But, maybe that gives you time to clean up whatever is wrong.

It is not the right way to go about it. (Also would break Let’s Encrypt.)

Would it not be simpler to interrupt the website with a new ‘temporary’ redirect 307 in the header ?

will not break LE renewal (classical “under maintenance” trick)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.