perl - Nginx rewrite all to index.pl -
i'm trying nginx serve index.pl url user enters
for example, want url https://www.example.me/723738
serve https://www.example.me/index.pl
i don't want use simple re-direct, because user must still have original url typed in address bar - perl script display url entered.
my problem request returns 502 gateway error cloudflare, i've been fiddling nginx config setting can't serve index.pl
here's relevant snippet of nginx settings
server{ listen [::]:80 default_server; server_name _; root /usr/share/nginx/html; rewrite ^.*$ /index.pl; # load configuration files default server block. include /etc/nginx/default.d/*.conf; location / { } location ~ \.pl$ { gzip off; include /etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:9001; fastcgi_index index.cgi; fastcgi_param script_filename $document_root$fastcgi_script_name; } error_page 500 502 503 504 /50x.html; location = /50x.html { } }
i appreciate help, thanks
Comments
Post a Comment