Answer the question
In order to leave comments, you need to log in
Why is the config not working?
My task is to redirect all php files in the /api/ folder to fpm
Here I wrote
location ~ \api\.php$ {
try_files $uri /index.php =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
rewrite ^(.*)$ /api/index.php break;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question