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;
}
}