我有linux VPS,我试图找出httpd.conf来检查设置并部署我的测试CGI脚本。我找到了以下列表httpd.conf:
/home/cpeasyapache/src/httpd-2.2/docs/conf/httpd.conf
/home/cpeasyapache/src/modsecurity-apache/tests/regression/server_root/conf/httpd.conf
/usr/local/apache/conf/original/httpd.conf
/usr/local/apache/conf/httpd.conf
/usr/local/apache/conf_pre_ea3/original/httpd.conf
/usr/local/apache/conf_pre_ea3/httpd.conf
我应该考虑哪一个?但我检查了:
/home/cpeasyapache/src/httpd-2.2/docs/conf/httpd.conf
/usr/local/apache/conf/httpd.conf
我可以看到:
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
根据设置,我编写了我的test.py和chmod 755 test.py并尝试从我的浏览器运行:
http://xxx.xxx.xxx.xxx/cgi-bin/test.py
但是我无法打印“hello test”作为我给出打印声明的脚本内部。
我收到“500内部服务器错误”。我是这个领域的新人。
请有人帮我解决这个问题。
答案 0 :(得分:0)
更改选项,试试这个:
<Directory "/usr/local/apache/cgi-bin">
Options +ExecCGI