Files
LEMPer/etc/nginx/includes/fcgiwrap.conf
2019-07-23 00:53:07 +07:00

34 lines
959 B
Plaintext

## Support cgi-bin scripts using fcgiwrap
# Designed to be included in any server {} block.
## Processing cgi file (like cgi-bin in Apache). Make use of FcgiWrap.
location /cgi-bin/ {
# Disable gzip (it makes scripts feel slower since they have to complete
# before getting gzipped)
gzip off;
fastcgi_index index.cgi;
# Set the root to /usr/lib (inside this location this means that we are
# giving access to the files under /usr/lib/cgi-bin)
#root /usr/lib;
# Fastcgi socket
fastcgi_pass unix:/var/run/fcgiwrap.socket;
# Fastcgi parameters, include the standard ones
include /etc/nginx/fastcgi_params;
# Adjust non standard parameters (SCRIPT_FILENAME)
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
}
# Pass all .cgi files onto CGI server
location ~ .*\.cgi$ {
gzip off;
fastcgi_index index.cgi;
fastcgi_pass unix:/var/run/fcgiwrap.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
}