Welcome! Log In Create A New Profile

Advanced

Dash in request url messes up regex?

June 26, 2015 04:48AM
I am requesting the url /magento-check.php and it gives me the php
code instead of running it through fpm. Other php files work just
fine. Seems like the dash is screwing with the php regex location and
going through root location with try_files, serving the php code.

location ~* \.php(/.*)?$
{
if (!-e $request_filename) { return 404; }

fastcgi_pass unix:/var/run/php-fpm/blah.sock;
fastcgi_split_path_info ^(.*\.php)(/.*)?$;
include fastcgi.conf;

expires off;
}

location /
{
try_files $uri $uri/ =404;
expires 28d;
}


Live long and prosper,

Christ-Jan Wijtmans
https://github.com/cjwijtmans
http://facebook.com/cj.wijtmans
http://twitter.com/cjwijtmans

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Dash in request url messes up regex?

chris-breda June 26, 2015 04:48AM

Re: Dash in request url messes up regex?

Francis Daly June 26, 2015 01:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 152
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