echo Content-Type: text/html
echo
echo “”
echo My username is :
whoami
echo
echo My id i??獡s?? ??ゐ?!s :
id
echo
echo Here is /etc/passwd :
cat /etc/passwd
echo “”
3) 改变test.sh的执行权限:
# chmod 555 test.sh
4) 重启httpd服务:
# service httpd restart 若有错,看日志。
5) 浏览:http://server1.example1.com/cgi-bin/test.sh
6) 机器2能浏览http://server1.example1.com/cgi-bin/test.sh吗?
4.基本代理配置:
1) 机器1,检查squid 包装了没有,没有的话,则进行安装。
2) 机器1,启动squid 服务。
# service squid start
有问题? 看/var/log/messages.
3) 机器1,浏览器中设置代理端口为3128,举例:在mozilla: Edit | Preferences...|
Advanced | proxies 中,设定手动,端口为:3128,其他不动。
机器2,浏览器中类似设置为:手动,http代理:192.168.0.254 端口:3128。
4) 此时,机器1,能浏览server1.exmaple1.com.,若平时能上internet,此时也正常上 internet。
5) 机器2,不能浏览server1.example1.com 或internet。
查看/var/log/httpd/*的日志文件,原因是什么?
6) 编辑/etc/squid/squid.conf,在acl CONNECT method CONNECT行下,添加下列一行: