• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved 502 Bad Gateway on All domains

Kingsley

Silver Pleskian
Hello;

I have installed Plesk Onyx on my Ubuntu 16.04 server. migrated about 4 domains to the server. right now all domains are offline with 502 Bad Gateway error. just 2 days

This has happened before never found a fix, only stopped using plesk thinking that onyx will fix this, now its starting allover again.

I have whitelisted my IP on fail2ban, i have mode security enabled also.
 

Attachments

  • log.txt
    163.8 KB · Views: 8
Hi Kingsley,

you are here as a Plesk forum member now for quite some time, but you still forget, that we NEED informations, to help you with investigations:

Are the depending services running?
The issue from your log:
Code:
connect() failed (111: Connection refused) while connecting to upstream
mostly depends on a non - working service, or missing NGINX directives.
Which PHP - handler do you use at the domain(s)? If you use PHP-FPM, is the domain - specific socket created and the depending php-fpm - service running?
Did you make sure, that the ( possible ) ".htaccess" - file(s) are valid and the ( possible ) corresponding NGINX directives are added and valid?
Did you switch off Fail2Ban, mod-security and a possible working firewall on your server to eliminate possible misconfigurations?
 
Hi Kingsley,

you are here as a Plesk forum member now for quite some time, but you still forget, that we NEED informations, to help you with investigations:

Are the depending services running?
The issue from your log:
Code:
connect() failed (111: Connection refused) while connecting to upstream
mostly depends on a non - working service, or missing NGINX directives.
Which PHP - handler do you use at the domain(s)? If you use PHP-FPM, is the domain - specific socket created and the depending php-fpm - service running?
Did you make sure, that the ( possible ) ".htaccess" - file(s) are valid and the ( possible ) corresponding NGINX directives are added and valid?
Did you switch off Fail2Ban, mod-security and a possible working firewall on your server to eliminate possible misconfigurations?

Code:
2016/10/22 20:00:03 [error] 5253#0: *55050 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:01:03 [error] 5253#0: *55064 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:02:03 [error] 5253#0: *55072 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:03:03 [error] 5253#0: *55088 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:04:03 [error] 5253#0: *55098 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:05:03 [error] 5253#0: *55114 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:06:03 [error] 5253#0: *55124 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:07:02 [error] 5253#0: *55136 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:08:03 [error] 5253#0: *55155 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:09:03 [error] 5253#0: *55179 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:10:03 [error] 5253#0: *55195 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:11:02 [error] 5253#0: *55211 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:12:03 [error] 5253#0: *55235 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/22 20:13:03 [error] 5253#0: *55249 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
 
Hi Kingsley,

you are here as a Plesk forum member now for quite some time, but you still forget, that we NEED informations, to help you with investigations:

Are the depending services running?
The issue from your log:
Code:
connect() failed (111: Connection refused) while connecting to upstream
mostly depends on a non - working service, or missing NGINX directives.
Which PHP - handler do you use at the domain(s)?
FPM application served by apache

If you use PHP-FPM,?
YES

is the domain - specific socket created and the depending php-fpm - service running?
YES

Did you make sure, that the ( possible ) ".htaccess" - file(s) are valid and the ( possible ) corresponding NGINX directives are added and valid?
There is htaccess file and i did not add any new nginx directive

Did you switch off Fail2Ban, mod-security and a possible working firewall on your server to eliminate possible misconfigurations?
I just turned off mod-security and restarted nginx

IP Address Banning   Kraftysprouts Hosting.jpeg
 
Hi Kingsley,

i just restarted Nginx after turning off mod security
now that you know, that NGINX or/and mod-security might be the root cause, consider to investigate, why the previous error appeared.

Did you make sure, that the ( possible ) ".htaccess" - file(s) are valid and the ( possible ) corresponding NGINX directives are added and valid?
There is htaccess file and i did not add any new nginx directive
You know already, that NGINX CAN'T read ".htaccess" - files. You have to convert ( possible ) rules into NGINX directives and have to add them as additional NGINX directives at for example:

Home > Subscriptions > kraftysprouts.com > Websites & Domains > Apache & nginx Settings



Just for your notice:

If you use WORDPRESS for example, you could use the general directive:

Code:
    if (!-e $request_filename){
        rewrite ^(.*)$ /index.php break;
    }

... which works perfekt, when you didn't install plugins, which might need additional directives.
 
Hi Kingsley,


now that you know, that NGINX or/and mod-security might be the root cause, consider to investigate, why the previous error appeared.


You know already, that NGINX CAN'T read ".htaccess" - files. You have to convert ( possible ) rules into NGINX directives and have to add them as additional NGINX directives at for example:

Home > Subscriptions > kraftysprouts.com > Websites & Domains > Apache & nginx Settings



Just for your notice:

If you use WORDPRESS for example, you could use the general directive:

Code:
    if (!-e $request_filename){
        rewrite ^(.*)$ /index.php break;
    }

... which works perfekt, when you didn't install plugins, which might need additional directives.

I thought apache talks directly with PHP? am using nginx as a reverse proxy
 
Hi Kingsley,

I thought apache talks directly with PHP? am using nginx as a reverse proxy
Well, pls. consider to read the manuals and documentations, instead of assuming something that does not correspond to the facts, when you use the combination apache+nginx+php-fpm.

Header check from: https://www.kraftysprouts.com
HTTP/1.1 200 OK =>
Server => nginx
Date => Sat, 22 Oct 2016 20:04:21 GMT
Content-Type => text/html; charset=UTF-8
Connection => close
X-Powered-By => PleskLin
Link => ; rel="https://api.w.org/"
Vary => Accept-Encoding
So... who is IN FRONT of apache for this domain? ;)
 
Mod security is not the cause as its generating 502 bad gateway error again. i have gone to var/log to check on for apache2 and nginx error log files they are both empty.

The below is from proxy_error_log for this domain

Code:
2016/10/23 07:55:03 [error] 20791#0: *74679 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/23 07:56:03 [error] 20791#0: *74695 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/23 07:56:34 [error] 20791#0: *74704 connect() failed (111: Connection refused) while connecting to upstream, client: 66.249.69.163, server: kraftysprouts.com, request: "GET /wp-login.php?action=lostpassword HTTP/1.1", upstream: "https://45.33.123.217:7081/wp-login.php?action=lostpassword", host: "www.kraftysprouts.com"
2016/10/23 07:57:03 [error] 20791#0: *74714 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/23 07:58:03 [error] 20791#0: *74732 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
2016/10/23 07:59:03 [error] 20791#0: *74744 connect() failed (111: Connection refused) while connecting to upstream, client: 23.96.184.72, server: kraftysprouts.com, request: "GET / HTTP/1.1", upstream: "https://45.33.123.217:7081/", host: "www.kraftysprouts.com"
 
Hi Kingsley,

we are turning in circles here..... :(

Did you consider to add the additional nginx directive for your domain as suggested?
Did you make sure, that nginx, apache and the depending php - handler are running as expected, after your configuration have been recreated?

As additional test, I opened the site "https://www.kraftysprouts.com/wp-login.php?action=lostpassword" and did have no issues/problems at all. ;)
 
Hi Kingsley,

we are turning in circles here..... :(

Did you consider to add the additional nginx directive for your domain as suggested?
Like what? also all domains are affected except the URL to plesk backend

Did you make sure, that nginx, apache and the depending php - handler are running as expected, after your configuration have been recreated?
Ofcourse they are running, plesk panel is running perfectly.

As additional test, I opened the site "https://www.kraftysprouts.com/wp-login.php?action=lostpassword" and did have no issues/problems at all. ;)
You always open the site when i have restarted the the server
 
Hi Kingsley,

Your answer:
Like what? also all domains are affected except the URL to plesk backend

Did you overread my suggestion at => #7 ?


Your answer:
Ofcourse they are running, plesk panel is running perfectly.

Ups, you make a very big mistake here: Plesk uses its very own webserver ( called "sw-cp-server" ) and as well its very own php-fpm ( called "sw-engine" ) - pls. don't mix them with your apache - webserver, nginx and the depending php-fpm - version used for your domain(s). ;)


Your answer:
You always open the site when i have restarted the the server

Well, YOU asked for support, Kingsley. If you want us to stop the investigations, pls. consider to mark the thread as "solved". ;)
 
Hi Kingsley,

Your answer:
Like what? also all domains are affected except the URL to plesk backend

Did you overread my suggestion at => #7 ?


Your answer:
Ofcourse they are running, plesk panel is running perfectly.

Ups, you make a very big mistake here: Plesk uses its very own webserver ( called "sw-cp-server" ) and as well its very own php-fpm ( called "sw-engine" ) - pls. don't mix them with your apache - webserver, nginx and the depending php-fpm - version used for your domain(s). ;)


Your answer:
You always open the site when i have restarted the the server

Well, YOU asked for support, Kingsley. If you want us to stop the investigations, pls. consider to mark the thread as "solved". ;)

They are all down over here now.
 
root@server4:~# service apache2 status


Code:
root@server4:~# service apache2 status
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: inactive (dead) since Mon 2016-10-24 06:30:54 WAT; 11h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10142 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCES
  Process: 10123 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SU
  Process: 2423 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCE

Oct 24 06:30:52 server4 systemd[1]: Reloading LSB: Apache2 web server.
Oct 24 06:30:52 server4 apache2[10095]:  * Reloading Apache httpd web server apa
Oct 24 06:30:53 server4 apache2[10095]:  *
Oct 24 06:30:53 server4 systemd[1]: Reloaded LSB: Apache2 web server.
Oct 24 06:30:53 server4 systemd[1]: Reloading LSB: Apache2 web server.
Oct 24 06:30:53 server4 apache2[10123]:  * Reloading Apache httpd web server apa
Oct 24 06:30:54 server4 apache2[10123]:  *
Oct 24 06:30:54 server4 apache2[10142]:  * Stopping Apache httpd web server apac
Oct 24 06:30:54 server4 apache2[10142]:  *
Oct 24 06:30:54 server4 systemd[1]: Reloaded LSB: Apache2 web server.
lines 1-20/20 (END)...skipping...
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: inactive (dead) since Mon 2016-10-24 06:30:54 WAT; 11h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10142 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 10123 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)
  Process: 2423 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)

Oct 24 06:30:52 server4 systemd[1]: Reloading LSB: Apache2 web server.
Oct 24 06:30:52 server4 apache2[10095]:  * Reloading Apache httpd web server apache2
Oct 24 06:30:53 server4 apache2[10095]:  *
Oct 24 06:30:53 server4 systemd[1]: Reloaded LSB: Apache2 web server.
Oct 24 06:30:53 server4 systemd[1]: Reloading LSB: Apache2 web server.
Oct 24 06:30:53 server4 apache2[10123]:  * Reloading Apache httpd web server apache2
Oct 24 06:30:54 server4 apache2[10123]:  *
Oct 24 06:30:54 server4 apache2[10142]:  * Stopping Apache httpd web server apache2
Oct 24 06:30:54 server4 apache2[10142]:  *
Oct 24 06:30:54 server4 systemd[1]: Reloaded LSB: Apache2 web server.
 
Code:
root@server4:~# service nginx status
● nginx.service - Startup script for nginx service
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
   Active: active (running) since Sun 2016-10-23 11:02:11 WAT; 1 day 6h ago
  Process: 2626 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCC
  Process: 2624 ExecReload=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 2622 ExecReload=/usr/bin/test $NGINX_ENABLED = yes (code=exited, stat
  Process: 5479 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
  Process: 5021 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 4807 ExecStartPre=/usr/bin/test $NGINX_ENABLED = yes (code=exited, st
 Main PID: 5530 (nginx)
    Tasks: 2
   Memory: 51.7M
      CPU: 30.384s
   CGroup: /system.slice/nginx.service
           ├─2632 nginx: worker proces
           └─5530 nginx: master process /usr/sbin/ngin

Oct 23 11:02:11 server4 nginx[5021]: nginx: configuration file /etc/nginx/nginx.
Oct 23 11:02:11 server4 systemd[1]: Started Startup script for nginx service.
Oct 23 20:25:59 server4 systemd[1]: Reloading Startup script for nginx service.
Oct 23 20:25:59 server4 nginx[759]: nginx: the configuration file /etc/nginx/ngi
Oct 23 20:25:59 server4 nginx[759]: nginx: configuration file /etc/nginx/nginx.c
Oct 23 20:25:59 server4 systemd[1]: Reloaded Startup script for nginx service.
lines 1-23...skipping...
● nginx.service - Startup script for nginx service
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-10-23 11:02:11 WAT; 1 day 6h ago
  Process: 2626 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCCESS)
  Process: 2624 ExecReload=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 2622 ExecReload=/usr/bin/test $NGINX_ENABLED = yes (code=exited, status=0/SUCCESS)
  Process: 5479 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
  Process: 5021 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 4807 ExecStartPre=/usr/bin/test $NGINX_ENABLED = yes (code=exited, status=0/SUCCESS)
 Main PID: 5530 (nginx)
    Tasks: 2
   Memory: 51.7M
      CPU: 30.384s
   CGroup: /system.slice/nginx.service
           ├─2632 nginx: worker proces
           └─5530 nginx: master process /usr/sbin/ngin

Oct 23 11:02:11 server4 nginx[5021]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Oct 23 11:02:11 server4 systemd[1]: Started Startup script for nginx service.
Oct 23 20:25:59 server4 systemd[1]: Reloading Startup script for nginx service.
Oct 23 20:25:59 server4 nginx[759]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Oct 23 20:25:59 server4 nginx[759]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Oct 23 20:25:59 server4 systemd[1]: Reloaded Startup script for nginx service.
Oct 23 20:27:14 server4 systemd[1]: Reloading Startup script for nginx service.
Oct 23 20:27:14 server4 nginx[2624]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Oct 23 20:27:14 server4 nginx[2624]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Oct 23 20:27:14 server4 systemd[1]: Reloaded Startup script for nginx service.
~
 
Hi Kingsley,

... looks like a known "logrotate" - issue.... pls. post the following log - files for investigations:

/var/log/apache2/error.log
or
/var/log/httpd/error_log

/var/log/nginx/error.log

/etc/logrotate.d/apache2

or
/etc/logrotate.d/httpd

/etc/logrotate.d/nginx
 
Hi Kingsley,

... looks like a known "logrotate" - issue.... pls. post the following log - files for investigations:

/var/log/apache2/error.log
or
/var/log/httpd/error_log
/var/log/nginx/error.log

/etc/logrotate.d/apache2

or
/etc/logrotate.d/httpd
/etc/logrotate.d/nginx

Alright.

/var/log/apache2/error.log is EMPTY but error.log.1 contains the below

Code:
[Sun Oct 23 11:02:13.016820 2016] [suexec:notice] [pid 5770:tid 139627728242560] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Oct 23 11:02:13.244207 2016] [auth_digest:notice] [pid 5960:tid 139627728242560] AH01757: generating secret for digest authentication ...
[Sun Oct 23 11:02:14.004760 2016] [ssl:warn] [pid 5960:tid 139627728242560] AH01909: webmail.server4.kraftysprouts.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 11:02:14.005101 2016] [ssl:warn] [pid 5960:tid 139627728242560] AH01909: lists:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 11:02:14.005478 2016] [ssl:warn] [pid 5960:tid 139627728242560] AH01909: default-45_33_123_217:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 11:02:14.015374 2016] [mpm_event:notice] [pid 5960:tid 139627728242560] AH00489: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_fcgid/2.3.9 configured -- resuming normal operations
[Sun Oct 23 11:02:14.015415 2016] [core:notice] [pid 5960:tid 139627728242560] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 23 20:25:54.819467 2016] [mpm_event:notice] [pid 5960:tid 139627728242560] AH00491: caught SIGTERM, shutting down
[Sun Oct 23 20:25:57.005362 2016] [ssl:warn] [pid 597:tid 140666482329472] AH01909: webmail.server4.kraftysprouts.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:25:57.005808 2016] [ssl:warn] [pid 597:tid 140666482329472] AH01909: lists:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:25:57.006214 2016] [ssl:warn] [pid 597:tid 140666482329472] AH01909: default-45_33_123_217:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:25:57.007095 2016] [:notice] [pid 597:tid 140666482329472] ModSecurity for Apache/2.9.0 (http://www.modsecurity.org/) configured.
[Sun Oct 23 20:25:57.007109 2016] [:notice] [pid 597:tid 140666482329472] ModSecurity: APR compiled version="1.5.2"; loaded version="1.5.2"
[Sun Oct 23 20:25:57.007117 2016] [:notice] [pid 597:tid 140666482329472] ModSecurity: PCRE compiled version="8.38 "; loaded version="8.38 2015-11-23"
[Sun Oct 23 20:25:57.007122 2016] [:notice] [pid 597:tid 140666482329472] ModSecurity: LUA compiled version="Lua 5.1"
[Sun Oct 23 20:25:57.007126 2016] [:notice] [pid 597:tid 140666482329472] ModSecurity: LIBXML compiled version="2.9.3"
[Sun Oct 23 20:25:57.007130 2016] [:notice] [pid 597:tid 140666482329472] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Sun Oct 23 20:25:57.007782 2016] [suexec:notice] [pid 597:tid 140666482329472] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Oct 23 20:25:57.212139 2016] [auth_digest:notice] [pid 600:tid 140666482329472] AH01757: generating secret for digest authentication ...
[Sun Oct 23 20:25:58.006356 2016] [ssl:warn] [pid 600:tid 140666482329472] AH01909: webmail.server4.kraftysprouts.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:25:58.006776 2016] [ssl:warn] [pid 600:tid 140666482329472] AH01909: lists:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:25:58.007178 2016] [ssl:warn] [pid 600:tid 140666482329472] AH01909: default-45_33_123_217:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:25:58.017545 2016] [mpm_event:notice] [pid 600:tid 140666482329472] AH00489: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_fcgid/2.3.9 configured -- resuming normal operations
[Sun Oct 23 20:25:58.017582 2016] [core:notice] [pid 600:tid 140666482329472] AH00094: Command line: '/usr/sbin/apache2'
[Sun Oct 23 20:27:09.872979 2016] [mpm_event:notice] [pid 600:tid 140666482329472] AH00491: caught SIGTERM, shutting down
[Sun Oct 23 20:27:12.006653 2016] [ssl:warn] [pid 2437:tid 140398400419712] AH01909: webmail.server4.kraftysprouts.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:27:12.006963 2016] [ssl:warn] [pid 2437:tid 140398400419712] AH01909: lists:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:27:12.007281 2016] [ssl:warn] [pid 2437:tid 140398400419712] AH01909: default-45_33_123_217:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:27:12.007870 2016] [:notice] [pid 2437:tid 140398400419712] ModSecurity for Apache/2.9.0 (http://www.modsecurity.org/) configured.
[Sun Oct 23 20:27:12.007886 2016] [:notice] [pid 2437:tid 140398400419712] ModSecurity: APR compiled version="1.5.2"; loaded version="1.5.2"
[Sun Oct 23 20:27:12.007912 2016] [:notice] [pid 2437:tid 140398400419712] ModSecurity: PCRE compiled version="8.38 "; loaded version="8.38 2015-11-23"
[Sun Oct 23 20:27:12.007917 2016] [:notice] [pid 2437:tid 140398400419712] ModSecurity: LUA compiled version="Lua 5.1"
[Sun Oct 23 20:27:12.007920 2016] [:notice] [pid 2437:tid 140398400419712] ModSecurity: LIBXML compiled version="2.9.3"
[Sun Oct 23 20:27:12.007923 2016] [:notice] [pid 2437:tid 140398400419712] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Sun Oct 23 20:27:12.008448 2016] [suexec:notice] [pid 2437:tid 140398400419712] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sun Oct 23 20:27:12.215981 2016] [auth_digest:notice] [pid 2449:tid 140398400419712] AH01757: generating secret for digest authentication ...
[Sun Oct 23 20:27:13.008096 2016] [ssl:warn] [pid 2449:tid 140398400419712] AH01909: webmail.server4.kraftysprouts.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:27:13.008346 2016] [ssl:warn] [pid 2449:tid 140398400419712] AH01909: lists:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:27:13.008714 2016] [ssl:warn] [pid 2449:tid 140398400419712] AH01909: default-45_33_123_217:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 23 20:27:13.016773 2016] [mpm_event:notice] [pid 2449:tid 140398400419712] AH00489: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_fcgid/2.3.9 configured -- resuming normal operations
[Sun Oct 23 20:27:13.016826 2016] [core:notice] [pid 2449:tid 140398400419712] AH00094: Command line: '/usr/sbin/apache2'
[Mon Oct 24 06:30:53.522131 2016] [mpm_event:notice] [pid 2449:tid 140398400419712] AH00493: SIGUSR1 received.  Doing graceful restart
[Mon Oct 24 06:30:54.383872 2016] [core:notice] [pid 2449] AH00060: seg fault or similar nasty error detected in the parent process
 
/etc/logrotate.d/apache2

Code:
/var/log/apache2/*.log {
    daily
    missingok
    rotate 14
    compress
    delaycompress
    notifempty
    create 640 root adm
    sharedscripts
    postrotate
                if /etc/init.d/apache2 status > /dev/null ; then \
                    /etc/init.d/apache2 reload > /dev/null; \
                fi;
    endscript
    prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
            run-parts /etc/logrotate.d/httpd-prerotate; \
        fi; \
    endscript
}

/etc/logrotate.d/nginx

Code:
/var/log/nginx/*.log {
    daily
    copytruncate
    missingok
    notifempty
    compress
    delaycompress
}

 
Back
Top