Ubuntu下配置apache CGI的常用命令,供大家学习参考。 1)、重启命令:
复制代码代码如下:
sudo /etc/init.d/apache2 restart
2)、改变CGI等的默认路径:
复制代码代码如下:
sudo gedit /etc/apache2/sites-available/default
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> 3)、改变Apache识别CGI程序的扩展名:
复制代码代码如下:
sudo gedit /etc/apache2/mods-enabled/mime.conf
# To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi .pl |