-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Description
自己在运行项目时遇到了一些问题,现在已经解决。
问题
成功运行httpd后,可以通过命令curl -v localhost:4000/index.html和curl -v localhost:4000/color.cgi从服务端获得回应,但无法通过windows浏览器访问服务端。
解决
1、设置防火墙开放相应端口firewall-cmd --add-port=4000/tcp。这里修改了代码,将端口固定为4000而不是让系统随机分配。
2、使用whereis perl命令获得perl程序的地址,然后vim htdocs/color.cgi,将第一行的perl地址改为自己查到的路径。
在windows浏览器中输入(自己的虚拟机ip):4000,可成功访问index.html界面,输入颜色可获得color.cgi的运行结果。
Metadata
Metadata
Assignees
Labels
No labels