1

I have been having problems for several weeks on my Apache2 server with Ubuntu 22.04.1 + PHP 7.4

For no apparent reason, the server goes down on its own and the web is still under construction so it does not receive traffic.

The last log I got before the server crashed contains these lines:

[Fri Mar 03 10:42:44.687695 2023] [mpm_prefork:notice] [pid 756] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Fri Mar 03 10:42:44.687775 2023] [core:notice] [pid 756] AH00094: Command line: '/usr/sbin/apache2'
[Fri Mar 03 11:12:28.440866 2023] [authz_core:error] [pid 2882] [client 51.254.101.76:42478] AH01630: client denied by server configuration: /var/www/html/wp-content/uploads/code-execution.php, referer: https://purodeseo.es/wp-content/uploads/code-execution.php
Fri Mar  3 11:25:56 2023 (2778): Error Cannot kill process 778: Success!
[Fri Mar 03 21:08:02.583634 2023] [mpm_prefork:notice] [pid 756] AH00170: caught SIGWINCH, shutting down gracefully

I would be very grateful if someone could help me please,

Regards.

-I have tried to restart the server several times, it works again but when the server considers it appropriate, it crashes again. -I have tried to look for my problem in stackoverflow but what I find that is related does not work for me.

1 Answers1

0

os: ubuntu 16/20/22

apache2 ver: 2.4.x

php: 5.6/7.0/7.2

This might not be it... but it happened to a few of my (multiple) servers. i SUSPECT that what happened was that when the logrotate functions calls for apache to 'reload' it issues the call but fails. this problem happens intermittently.

-sometimes apache would start and serve only static html pages (not php)

-sometimes it would not start at all (apache at port 443 stopped)

usually a 'systemctl restart apache2' would fix it.

so i thought maybe i had to change the 'reload' call in /etc/logrotate.d/apache2, and change the line

invoke-rc.d apache2 reload > /dev/null 2>&1;

into

invoke-rc.d apache2 restart > /dev/null 2>&1;

then again, its just a suggestion, it might not solve it.