Having following configuration, PHP files, if requested from /junk or
/pub
locations, are treated as binary. Sample request - domain.com/pub/i.php
→
file is downloaded to PC instead of executing.
Have no problems serving PHP files from other locations. Having separate
locations for /pub /junk with autoindex also works, however my intention
is
to combine them in one expression.
upstream www-default {
server unix:/dev/shm/www-default.sock;
}
On Tue, Sep 25, 2012 at 10:04 AM, technoplague [email protected]
wrote:
Hi,
Having following configuration, PHP files, if requested from /junk or /pub
locations, are treated as binary. Sample request - domain.com/pub/i.php →
file is downloaded to PC instead of executing.
Have no problems serving PHP files from other locations. Having separate
locations for /pub /junk with autoindex also works, however my intention is
to combine them in one expression.
That’s because when both locations are regexp, the first match is used
while when it’s regexp and normal, regexp is used. Try moving the php
block to the top.