I can't access GUI after restoring AMI's from AWS

I backed up one of our systems a couple days ago and tried to restore it today. I eventually got it to the point where I could SSH into it, but couldn’t get it working or get the GUI operational. I thought it was just a bad image so I tried a different AMI and I’m having the same issue. Anyone have any ideas? Thanks!

What happens when you try to access it?

Nothing. The site doesn’t load. Same as if it wasn’t there at all.

If you are able to ssh in, start by disabling the firewall: fwconsole firewall disable

Check your EC2 security group also.

I disabled the firewall and set the security group to allow all just to see if that would work, but it didn’t.

Connect to the console session through the web browser to see what state the VM is in.

I’m getting these errors when I try to restart apache:

httpd[9135]: AH00112: Warning: DocumentRoot [/invalid/folder/name] does not exist
httpd[9135]: AH00526: Syntax error on line 28 of /etc/httpd/conf.d/ssl.conf:
httpd[9135]: SSLCertificateFile: file ‘/etc/httpd/pki/webserver.crt’ does not exist or is empty
systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start The Apache HTTP Server.
systemd[1]: Unit httpd.service entered failed state.
systemd[1]: httpd.service failed.

I think it has something to do with the Letsencrypt cert expiring. I wasn’t able to update it so I deleted it and generated another, but it created a default self signed cert. I tried to create an LE cert, but I get a DNS error. The DNS info has been setup for a couple years and hasn’t changed.

Anyone have any ideas? I have other systems that are on default certs and they are working fine.

fwconsole sa clearforce

If it’s an issue with the cert and sysadmin is forcing HTTPS, you should be able to access the gui over HTTP afterwards and handle the rest from there

That’s what’s weird. I was accessing it on port 8080 before so no https. I honestly don’t know why apache would care what cert was there. I tried that command by the way and no change unfortunately.

I’ve had an issue after upgrades (understand it’s not your situation) that required me to run

yum reinstall httpd

in order to regain access to the gui.

Tried that just now. Still getting the same errors. If I try to run httpd I get:

AH00112: Warning: DocumentRoot [/invalid/folder/name] does not exist
AH00526: Syntax error on line 28 of /etc/httpd/conf.d/ssl.conf:
SSLCertificateFile: file ‘/etc/httpd/pki/webserver.crt’ does not exist or is empty

I ran nano /etc/httpd/conf.d/ssl.conf and the 28th line is the next line in the error. “SSLCertificateFile: file ‘/etc/httpd/pki/webserver.crt’”

I don’t know if I can just create that file somehow or change the path to it. I’m not real sure where to go from here.

You could change that line to specify your cert in /etc/asterisk/keys and restart httpd to see if that helps

Ok, I did that and I get these 2 errors now. They’re a little more generic.

AH01574: module ssl_module is already loaded, skipping
AH00112: Warning: DocumentRoot [/invalid/folder/name] does not exist

Warning: DocumentRoot [/invalid/folder/name] does not exist - Google Search

Thanks, I’ve googled that. That’s why I’m here. The closest thing I’ve found helpful is a post that says “The fault was in in the SSL cert files, deleted all the certificates, installed a new one & working fine”, but that didn’t work for me. That’s why I have a self signed cert now instead of a Let’s Encrypt. I couldn’t get the LE cert to update.

I went to the second result, apache2 - AH00112: Warning: DocumentRoot [/html/www/html] does not exist - Ask Ubuntu

saw that it mentioned:

AH00112: Warning: DocumentRoot [/html/www/html] does not exist

Saw a response:

Actually, it’s just a warning not an error, and you can ignore it. It’s happened if you define DocumentRoot in the virtual host to not existed path.

I went to /etc/httpd/conf.d and took a look at the files and found a couple that had DocumentRoot defined. Perhaps one of them is wrong? schmoozecom.conf or ssl.conf?

Not sure as mine is looking/working as expected, but maybe this moves you further.

grep -ri DocumentRoot /etc/httpd/
1 Like

So schmoozecom.conf had that line in it, but is that even the issue? I just assume it was because of the error, but if it’s just a warning and can be ignored maybe I’m looking into the wrong place. Or should I try to edit that line?

/etc/httpd/conf.d/schmoozecom.conf: DocumentRoot /invalid/folder/name