Urgent:
What can be happening for Apache and Nginx suddenly stop working? (and not restarting)
apache and nginx do not start / restart
- myVesta
- Site Admin
- Posts: 932
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 8 times
- Been thanked: 6 times
A hundred different reasons.
Please check:
and also:
and also:
and also:
Please check:
Code: Select all
tail -n 30 /var/log/apache2/error.log
Code: Select all
tail -n 30 /var/log/nginx/error.log
Code: Select all
systemctl status apache2
Code: Select all
systemctl status nginx
Here i can see the IP that I changed in order to rescue the server (it just failed and i needed to recover it from a backup and switched the IP´s but it didn´t switched in the nginx (for example)
tail -n 30 /var/log/apache2/error.log
(no answer)
jpsciolli@cp:/var/log/apache2$ sudo ls -ll
total 168
-rw-r----- 1 root adm 0 Feb 19 2021 access.log
drwxr-x--x 2 root root 49152 Sep 20 13:32 domains
-rw-r----- 1 root adm 0 Sep 20 13:32 error.log (this is empty)
-rw-r----- 1 root adm 308 Sep 5 00:00 error.log.1 (this is the result)
[Sun Sep 05 00:00:02.871678 2021] [mpm_event:notice] [pid 723:tid 140255367857280] AH00489: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1d configured -- resuming normal operations
[Sun Sep 05 00:00:02.871742 2021] [core:notice] [pid 723:tid 140255367857280] AH00094: Command line: '/usr/sbin/apache2'
jpsciolli@cp:/var/log/apache2$ sudo tail -n 30 /var/log/nginx/error.log
2021/09/28 08:24:26 [emerg] 708#708: bind() to 69.164.202.196:443 failed (99: Cannot assign requested address)
2021/09/28 08:24:45 [emerg] 2027#2027: bind() to 69.164.202.196:443 failed (99: Cannot assign requested address)
jpsciolli@cp:/var/log/apache2$ systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-09-28 08:24:39 -05; 3h 28min ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 1780 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
tail -n 30 /var/log/apache2/error.log
(no answer)
jpsciolli@cp:/var/log/apache2$ sudo ls -ll
total 168
-rw-r----- 1 root adm 0 Feb 19 2021 access.log
drwxr-x--x 2 root root 49152 Sep 20 13:32 domains
-rw-r----- 1 root adm 0 Sep 20 13:32 error.log (this is empty)
-rw-r----- 1 root adm 308 Sep 5 00:00 error.log.1 (this is the result)
[Sun Sep 05 00:00:02.871678 2021] [mpm_event:notice] [pid 723:tid 140255367857280] AH00489: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1d configured -- resuming normal operations
[Sun Sep 05 00:00:02.871742 2021] [core:notice] [pid 723:tid 140255367857280] AH00094: Command line: '/usr/sbin/apache2'
jpsciolli@cp:/var/log/apache2$ sudo tail -n 30 /var/log/nginx/error.log
2021/09/28 08:24:26 [emerg] 708#708: bind() to 69.164.202.196:443 failed (99: Cannot assign requested address)
2021/09/28 08:24:45 [emerg] 2027#2027: bind() to 69.164.202.196:443 failed (99: Cannot assign requested address)
jpsciolli@cp:/var/log/apache2$ systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-09-28 08:24:39 -05; 3h 28min ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 1780 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)