set $PHP_ENV 1; location ~ [^/]\.php(/|$) { try_files $uri =404; #fastcgi_pass unix:/tmp/php-cgi-{$PHP_VERSION}.sock; fastcgi_pass MW-UPSTREAM-PHP{$PHP_VERSION}; fastcgi_index index.php; include fastcgi.conf; include {$SERVER_PATH}/web_conf/php/pathinfo.conf; }