File nginx_php-fpm of Package nginx

##
## Enable using php-fpm upstream included via conf.d/upstream.conf
##

##
## This file intended to be included in vhost configuration as
##
## include vhosts.d/_php-fpm;
##
## Note that if you use static definitions from file vhosts.d/_static include
## this file BEFORE it and any locations for static files with regular
## expressions because some PHP-frameworks serve static files via PHP logic
##

location ~ ^(?<script_name>.+?\.php)(?<path_info>/.*)?$ {
    try_files $script_name =404;

    include fastcgi.conf;
    fastcgi_param PATH_INFO $path_info if_not_empty;
    fastcgi_pass  php-fpm;
}
openSUSE Build Service is sponsored by