Answer the question
In order to leave comments, you need to log in
How to allow php files to be executed only from a specified directory?
Hello!
The root of the site is in /var/www/site/www/
How to allow execution of only those php files that are in the directory
/var/www/site/www/scripts/user/
Answer the question
In order to leave comments, you need to log in
location / {
root /var/www/site/www/;
}
location ~ \.php$ {
root /var/www/site/www/scripts/user/;
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question