Aftermath Fan
nginx basic auth breaks php-fpm?
April 10, 2011 07:36PM
I have nginx + php-fpm on Debian 6 and it works fine.

If I setup basic auth for a directory, however, everything breaks. I
suspect it's an nginx location rule matching problem, but what I don't
get is that I see this in my nginx logs:

2011/04/10 14:52:05 [error] 1826#0: *9 open() "/usr/local/nginx/html/
wiki/skins/common/images/poweredby_mediawiki_88x31.png" failed (2: No
such file or directory), client: x.x.x.x, server: example.org,
request: "GET /wiki/skins/common/images/poweredby_mediawiki_88x31.png
HTTP/1.1", host: "www.example.org", referrer: "http://www.example.org/
wiki/index.php?title=Main_Page"

That is a message from php-fpm, I believe.

/usr/local/nginx doesn't exist, and that string doesn't appear
anywhere in /etc/php5 or /etc/nginx (grep -R -i), so where could php-
fpm be getting it from? Why would it be looking in '/usr/local/nginx'
when I've never told it anything about such a directory?

If I turn off basic auth for the /wiki, it works fine and these
messages disappear. I am reloading both nginx & php-fpm after every
change to any config file.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 164
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready