I am running Nginx server on Debian 9. My problem is that, Nginx is serving Perl files in root directory, but it is not serving in alias directory (I get 403 Forbidden).
This is my configuration of alias:
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
server {
listen 80;
server_name www.example.tld example.tld;
root /srv/!example.tld/!www;
index desktop.pl index.html index.htm core.tom core.pl;
location /my_alias {
alias /srv/!example.tld/my_alias/!www;
location ~ /my_alias/\.pl$ {
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
}
location ~ \.pl$ {
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
}
I really don't know what is wrong with it.
Everything what I want is to execute Perl files on whole server (all aliases), ideal is to execute Perl files on ALL sites (virtualhosts).
0 Answers