K
K
Kirill Zhilyaev2017-06-10 16:12:47
Nginx
Kirill Zhilyaev, 2017-06-10 16:12:47

How to make 2 locations work together?

For PHP:

location ~ \.php$ {
            include fastcgi.conf;
            fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
            fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
            set $path_info $fastcgi_path_info;
            fastcgi_param PATH_INFO $path_info;
            fastcgi_param SERVER_SIGNATURE	nginx/$nginx_version;
            fastcgi_index index.php;
            try_files $fastcgi_script_name =404;
            fastcgi_pass php-fpm;
        }

This PHP block pulls all requests onto itself, preventing other nearby locations from being executed. How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2017-06-10
@BuriK666

https://stackoverflow.com/questions/5238377/nginx-...
nginx.org/ru/docs/http/request_processing.html
and what are the others? show all config

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question