配置Apache指定任意文件夹运行perl
时间:2020-02-18 来源:互联网 编辑:宝哥软件园 浏览:次
1、编辑Apache配置文件httpd.conf,加入如何代码:
AddHandler cgi-script .cgi AddHandler cgi-script .pl
2、设置根目录的perl执行权限。
在
<Directory /home/user/public_html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
找到
Options Indexes FollowSymLinks MultiViews
替换为
Options All
3、虚拟主机配置例子
<VirtualHost 67.228.104.123:80> DocumentRoot /var/www/cgi-bin/ ServerName git.bizhat.com CustomLog /var/log/httpd/git.bizhat.com.log combined AddHandler cgi-script .cgi <Directory "/var/www/cgi-bin/"> AllowOverride None Options All Order allow,deny Allow from all </Directory> </VirtualHost>
版权声明:配置Apache指定任意文件夹运行perl是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。