Apache2 does not want to restart

SYSTEM INFORMATION
OS type and version Ubuntu 26.04
Virtualmin version 8.0

I tried to update opcache in php elements list, for nextcloud to work properly.

But now Apache2 does not want to restart I restarted all server status’s but apache 2 will not start.

You’ll need to look at the error log (the system one, in /var/log/apache2/error_log not the one for an individual VirtualHost) to figure out what’s going wrong, or roll back the changes you made.

How did you “update opcache in php elements list”?

I looked at the php configuration file and un-coloned where opcache was, but only on a select few

error.log (6.1 KB)

Here is the error.log for apache

I’ve un-coloned each aspect of the opcache instance inside php configuration.

And tried to restart apache, but to no avail will it start.

Yes, but unfortunately this has somehow triggered AH00016: Configuration Failed. Have you kept a backup? If not, apache2ctl -t or sudo apachectl configtest will tell you where the error is.

I reinstalled my server and done a fresh restore, now my websites are showing a 403 error or not autherized apart from one, i installed zip and cgm for xenforo.

i tried to do a new link for my main server for only one website but must of done it for all, custom link, I then deleted this and now my sites dont work.

unfathemcortex.com

forum.unfathemcortex.com

and some others that have yet to get my ip address and a, aaaa, mx, dns.

just tried to restart apache2 and will not start yet again.

Without showing what errors apache2 is giving it’s impossible to diagnose the fault. Perhaps post the apache2 error so some one can help you

And please indicate how much time you would give the community before you reinstall your server again, for them to read your messages, diagnose your issue and offer remedial suggestions. If it is just a few seconds or minutes (for example, I had replied 12 minutes after you posted) then we would know when we should give up on you.

Is this a new problem or did you replicate what caused the problem before?

If it’s a new problem, we’ll need to see the relevant error log entries (and it should probably be a new topic, since I’m not able to keep up with threads that change midstream to some other issue).

I had the same error today so I’ll tell you what happened just in case it’s related.

I have an Ubuntu 24.04 server with MANY sites across a few domains on it. One of those sites has a wildcard cert on it. That cert is not used on many sites; it is an SSO app where the username is a subdomain of the main domain. But frequently when I create a new site on the server, it wants to use that wildcard cert for the new site too.

Such was the case this morning. I created the new sub-server without issue. When it came time to set up the cert for this site (letsencrypt) it was already sharing the wildcard cert. So I clicked the “stop sharing” button to release the wildcard cert, as I have done many times. But all hell broke loose. Apache died and wouldn’t restart. The typical apachectl and journal queries weren’t very helpful. If it was a particular site that was causing the problem it was hard to tell which one it was. I eventually made my way to the ssl_engine.log and saw “AH00016: Configuration Failed” without any context. Each time I tried to start Apache that single line was added to the log.

The apache test configuration was somewhat helpful. It indicated a permission issue with a cert that hadn’t been an issue before. But that confirmed to me that it was at least a cert issue, which was my suspicion based on what I had most recently done. All of the following failed to fix the problem: reset file permissions, delete my new site, then start disabling ssl options for sites as indicated by the configuration test. That would show the same error for successive sites as I disabled ssl for the site shown. At the 4th site I got exasperated and thought “this is just going to go through all my sites until ssl is disabled on all of them” and concluded I should look elsewhere. I was googling like mad the whole time.

I did two things that might have been full or partial solutions. I have lost track of which one was first or last. 1) I deleted a site that simply had a redirect in .htaccess to another site. This site has been annoying for a while, since letsencrypt doesn’t work on a redirected site. The cert was possibly expired. 2) I disabled ssl on the 4th site above, the one I gave up on before trying it. This site was actually intended to use a wildcard cert, but had been out of use for about 3 years. The cert was most certainly expired.

In any case, apache came back up, and I repaired the configurations I had disabled without incident.

What concerns me most is that I hadn’t done anything I hadn’t done without issue before, but this time it resulted in about an hour of downtime for a live server.