Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Nginx - inherit configuration for executing Perl Is possible to inherit rule of executing Perl files (*.pl) for whole server? I mean that I will declare block "location ~ .pl$ {}" only once

@Nimeshi995

Posted in: #Configuration #Nginx #Perl

Is possible to inherit rule of executing Perl files (*.pl) for whole server? I mean that I will declare block "location ~ .pl$ {}" only once and it will inherit for all aliases.

Because now if I want to add new alias, I need to copy pase "location ~ .pl$ {}" block for executing Perl files (*.pl).

One more question, is possible to apply rule of executing Perl files to all servers (sites) once?

My configuration:

server {
listen 80;
listen [::]:80;
server_name example.tld example.tld;
root /srv/!example.tld/!www;

index core.pl index.html index.htm;

location ~ .pl$ {
gzip off;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_index index.pl;
fastcgi_param SCRIPT_FILENAME /srv/!example.tld/!www$fastcgi_script_name;
}
}

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme