Apache2 and nginx failed to start

My website is down i was changing a couple of items from the panel and not apache2 and nginx refuse to start :confused: I have restarted server to see if that will fix the issue but no. I tried to restart via control panel and putty still nothing.

can you run following commands and share the output?

systemctl -l status nginx.service
systemctl -l status apache2.service
1 Like

I had an domain.com before, but it was working without issue after change.

systemctl -l status nginx.service

● nginx.service - nginx - high performance web server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
   Active: failed (Result: exit-code) since Thu 2021-02-11 18:08:08 UTC; 48min a
     Docs: http://nginx.org/en/docs/
  Process: 27726 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited
Feb 11 18:08:08 domain.com systemd[1]: Starting nginx - high performance web se
Feb 11 18:08:08 domain.com nginx[27726]: nginx: [emerg] cannot load certificate
Feb 11 18:08:08 domain.com systemd[1]: nginx.service: Control process exited, c
Feb 11 18:08:08 domain.com systemd[1]: nginx.service: Failed with result 'exit-
Feb 11 18:08:08 domain.com systemd[1]: Failed to start nginx - high performance
lines 1-11/11 (END)...skipping...
● nginx.service - nginx - high performance web server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2021-02-11 18:08:08 UTC; 48min ago
     Docs: http://nginx.org/en/docs/
  Process: 27726 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1

Feb 11 18:08:08 domain.com systemd[1]: Starting nginx - high performance web server...
Feb 11 18:08:08 domain.com nginx[27726]: nginx: [emerg] cannot load certificate "/home/dbn
Feb 11 18:08:08 domain.com systemd[1]: nginx.service: Control process exited, code=exited
Feb 11 18:08:08 domain.com systemd[1]: nginx.service: Failed with result 'exit-code'.
Feb 11 18:08:08 domain.com systemd[1]: Failed to start nginx - high performance web serve

systemctl -l status apache2.service

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2021-02-11 18:08:03 UTC; 53min ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 27401 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Feb 11 18:08:03 domain.com systemd[1]: Starting The Apache HTTP Server...
Feb 11 18:08:03 domain.com apachectl[27401]: AH00112: Warning: DocumentRoot [/home/dbn.
Feb 11 18:08:03 domain.com apachectl[27401]: AH00526: Syntax error on line 29 of /etc/apach
Feb 11 18:08:03 domain.com apachectl[27401]: SSLCertificateFile: file '/home/dbn/co
Feb 11 18:08:03 domain.com apachectl[27401]: Action 'start' failed.
Feb 11 18:08:03 domain.com apachectl[27401]: The Apache error log may have more information
Feb 11 18:08:03 domain.com systemd[1]: apache2.service: Control process exited, code=exited
Feb 11 18:08:03 domain.com systemd[1]: apache2.service: Failed with result 'exit-code'.
Feb 11 18:08:03 domain.com systemd[1]: Failed to start The Apache HTTP Server.

It’s not starting as it’s missing certificates or cannot read/find them at the location set in the config.

nginx: [emerg] cannot load certificate

apachectl[27401]: SSLCertificateFile: file '/home/dbn/co

Yes because I changed the main domain? But as I said it was working before now I am not sure why its not. I am not sure how to change/edit this?

The new domain shows I have SSL enabled in control panel. Maybe nginx and apache2 are looking for the old domain?

EDIT: When I try to give the new domain a certification this error comes out “Error: Let’s Encrypt validation status 400. Details: Unable to update challenge :: authorization must be pending”

Check what certificate it actually looking f

Yes, that is due to nginx and apache2 not being able to start.

Your first need to find out what certificate it is actually looking for. Your logs posted are sadly cut off and i cannot see what its looking for.

1 Like

you can run following command and it will shows you what cert its missing.

nginx -t

1 Like