ubuntu配置apache运行cgi脚本
2019-08-22 22:50:14

ubuntu配置apache运行cgi脚本


安装完后进入下面的目录:


cd /etc/apache2/conf-enabled

打开下面的配置文件:


sudo vim serve-cgi-bin.conf 

把默认的cgi目录修改为你自己的目录:


ScriptAlias /cgi-bin/ /var/www/html/cgi-bin/   #修改为你的cgi文件目录路径

<Directory "/var/www/html/cgi-bin">   #和上面保持一致

   AllowOverride None

   Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch

   Require all granted

</Directory>


重启服务:

sudo service apache2 restart