1.vim /etc/httpd/conf/httpd.conf
查找 ScriptAlias配置为:
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
AllowOverride None
Options None
Order allow,deny
Allow from all
/var/www/cgi-bin就是存放CGI文件的地方
2.查找
AddHandler配置为:
AddHandler cgi-script .cgi
3./sbin/service httpd restart
4.test script
vim /var/www/test.cgi:
#! /usr/bin/perl
print "Content-type: text/html\n\n";
print "\n";
print "\n";
print "Hello Html\n";
print "Hello World
\n";
print "";
5.chmod 0755 test.cgi
6.
阅读(2311) | 评论(0) | 转发(0) |