Dash in request url messes up regex?

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

http://twitter.com/cjwijtmans

On Fri, Jun 26, 2015 at 10:46:35AM +0200, Christ-Jan Wijtmans wrote:

Hi there,

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.

Does “curl -i http://your-server/magento-check.php” show a http header
which indicates that PHP is processing the file?

Is there any difference in response if you add “<?php” at the start of
the magento-check.php file?

f

Francis D. [email protected]