1 cd /var/www/html
2 vim index.php
3 ls
4 cd /etc/httpd/conf.d
5 yum install php -y
7 systemctl restart httpd
8 yum install httpd -y
9 yum install httpd-manual -y
10 cd /var/www/html
11 mkdir cgi
12 cd cgi
13 vim index.cgi
#!/usr/bin/perl
print “Content-type: text/html\n\n”;
print “Hello World.”;
14 chmod 755 index.cgi ##index.cgi需要读取权限,才能在测试机正常显示
15 cd /etc/httpd/conf.d
16 vim a_default.conf
DocumentRoot /var/www/html
Customlog logs/default.log combined
31 systemctl restart httpd
1.测试机端浏览器输入:172.25.254.152/cgi/index.cgi