Apache Service will not start after Domain / Server rename

SYSTEM INFORMATION
OS type and version Rocky 9.2
Virtualmin version 7.7

I have gradually been migrating sites off my hosted service, and onto my Virtualmin server at home. The first few went smoothly, as they were subdomains of my main domain that is unique to my home server, and not a direct move / repointing of domains.

www.aiskon.net - Hosted as a part of a Proxy server, not in Virtualmin.
roundcube.aiskon.net - a simple Roudcube install to read email on my server. Sub-Server of Aiskon.net
krarchive.aiskon.net - Joomla site moved from another domain to this one.
starchive.aiskon.net - Joomla site moved from another domain to this one.
wedding.aiskon.net - Joomla site moved from another domain to this one, with the intent to rename it once it was migrated and working.

All of the servers were working fine this morning. This afternoon, around 2:00 PM, I renamed the server wedding.aiskon.net to geoffanddiane.com, and pointed the A record for geoffanddiane.com to my Virtualmin server IP (using Namecheap’s Dynamic DNS, I can confirm it’s pointing to the correct address).

Once that happened, multiple sites suddenly stopped working, with a HTTP 502 error.

All sites - krarchive, starchive, roundcube, and the newly renamed wedding site - gave the 502 error. When I looked in Virtualmin, I saw the Apache service and BIND were not running.

BIND, I was able to fix by trying to run it and using the built in tools in Virtualmin. It found some bad entries in the config, I cleared them, and it’s running again.

Apache, however, still will not start. I’ve deleted the renamed server in the hopes that it would clear the issue that triggered this, but no luck. I created a new server (testing.aiskon.net) to see if that would force the issue to clear up, again no luck. When I look at my Apache configs, I don’t see any obvious issues, and when I save it it does not warn me about an invalid config or other error. When I go to the Apache config module, and try to start Apache from there, I get the following error:

“Failed to start apache : Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xeu httpd.service" for details.”

I’m at a loss what my next steps are - how do I get Apache running again?

Thank you for your help!

EDIT: www.aiskon.net is on a different server, I forgot I had it as a part of my Proxy server instead of Virtualmin.

what does the command

systemctl status httpd.service

return this will give you the error . If it’s a config error this output will give you the file name and line number of the error

1 Like

Output is:

root@webhost:~# systemctl status httpd.service
× httpd.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/httpd.service.d
             └─php-fpm.conf, php74-php-fpm.conf
     Active: failed (Result: exit-code) since Wed 2023-05-31 18:52:03 EDT; 13h ago
       Docs: man:httpd.service(8)
    Process: 18501 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
   Main PID: 18501 (code=exited, status=1/FAILURE)
     Status: "Reading configuration..."
        CPU: 120ms

May 31 18:52:03 webhost.aiskon.net systemd[1]: Starting The Apache HTTP Server...
May 31 18:52:03 webhost.aiskon.net systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
May 31 18:52:03 webhost.aiskon.net systemd[1]: httpd.service: Failed with result 'exit-code'.
May 31 18:52:03 webhost.aiskon.net systemd[1]: Failed to start The Apache HTTP Server.
root@webhost:~# 

Have you changed any SSL settings recently ?

Not in the past few days. At one point, I’d disabled Apache SSL (planning on using a Proxy instead), but then re-enabled it when I realized the Virtualmin interface itself needed it. It worked for a few days, until I changed the domain name… that may have been the trigger for an underlying issue I created, I am guessing.

I am guessing that you have apache looking for an invalid ssl cert, look at the apache config file for the domain you changed and see if the path to the file is valid

OK, I think that was the hint I needed. I am seeing the Apache SSL server was removed / disabled in Virtualmin, so I am re-adding it back in and will check individual sites to make sure they all have it enabled. I’ll report back once done to see if that fixes it.

Thank you for pointing me in the right direction!

After re-creating all of my SSL servers for my domains, I looked at the list of Apache servers, and noticed there were two SSL servers for one of the domains (the default one I used for Virtualmin). I deleted the one that wasn’t in the pattern with the rest, and Apache started again.

Thank you for the help and guidance!

no worries glad you got apache going again

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