Welcome! Log In Create A New Profile

Advanced

logging not found .php files with nginx + php-fpm

Posted by Rancor 
logging not found .php files with nginx + php-fpm
July 16, 2011 09:41AM
Hi!

Hope this wasn't asked before, but i found no informations on this.

I'm trying to log an access to not found files when using nginx together with php-fpm so i can't use this logfiles for fail2ban banning.

Nginx and php-fpm are working fine and an access to a not existing .html/.jpg file or folder is logged into my nginx error.log. But if the file ends with .php nothing is logged.

I think this is because i'm using cgi.fix_pathinfo = 0 in my php.ini and fastcgi_intercept_errors on; together with error_page 404 /404.html; in my vhost config.

Does anyone knows how to enable logging of this .php files?

Thanks in advance for a reply.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 135
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready