如何解决NGINX fastcgi无法获取脚本名称
我正在nginx上设置fastcgi。我有它的工作。如果我有factcgi_param SCRIPT_FILENAME /var/www/cgi-bin/hello.cgi;
,则可以在我的位置信息块中运行。但是我不想对链接进行硬编码。
使用以下配置设置fastcgi
factcgi_param SCRIPT_FILENAME /var/www/cgi-bin/$fastcgi_script_name;
我收到以下错误
cannot get script name are document_root and script_name or (script_file) set and is the script executable?
while reading response header upstream from upstream. client 127.0.0.1,server _,request "get /cgi-bin/hello.cgi"
在网页上我被禁止使用403
hello.cgi
是可执行文件,在我对其进行硬编码时也可以运行。
我的fastcgi_params
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。