I have Nginx server up and running, I am trying to host a CGI script, so, it is hosted at
https://sub.domain.com/index.cgi
instead, I want it like
https://sub.domain.com/
Here is my current Nginx Config:
server {
listen 80;
server_name sub.domain.com;
location / {
add_header Access-Control-Allow-Origin *;
root /home/user/folder;
index index.html;
}
location ~ (.cgi|.py|.sh|.pl|.lua)$ {
index index.html;
gzip off;
root /home/user/folder;
autoindex on;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
fastcgi_param DOCUMENT_ROOT /home/user/folder;
fastcgi_param SCRIPT_FILENAME /home/user/folder/index.cgi;
}
}
question from:
https://stackoverflow.com/questions/66062556/how-to-hide-py-cgi-pl-in-my-urls 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…