[英]cgi script runs as plain text instead of a webpage on mac
我已经按照这篇文章来运行test.pl文件:
http://editrocket.com/articles/perl_apache_mac.html
我还在httpd.conf文件中做了一些配置,这是我所做的快照:
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Allow from all
</Directory>
.....
#
# "/Library/WebServer/CGI-Executables" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/Library/WebServer/CGI-Executables">
AllowOverride None
Options None
Require all granted
</Directory>
...
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi .pl
就像当我运行http:// localhost时 apache服务器正在运行时,我得到一个“它有效!” 页。 我还应该怎么做才能使.cgi运行?
所以..我进一步研究了它,并再次访问了更多堆栈溢出帖子。 轮到我需要取消注释配置文件中的行:
LoadModule cgi_module libexec/apache2/mod_cgi.so
在我遵循的教程中没有提到。 感谢您之前的所有评论
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.