在 system1 上配置提供动态web内容,要求:html
一、动态内容由名为 wsgi.group8.example.com 的虚拟主机提供web
二、虚拟主机侦听在端口 8909vim
三、从 http://server.group8.example.com/pub/webinfo.wsgi 下载一个脚本,而后放在适当的位置,不管如何不要求修改此文件的内容curl
四、客户端访问 http://wsgi.group8.example.com:8909/时,应该接收到动态生成的web页面tcp
五、此 http://wsgi.group8.example.com:8909/ 必须能被 group8.example.com 域内的全部系统访问测试
答:url
再system1上执行spa
一、创建虚拟主机。rest
vim /etc/httpd/conf.d/httpd-vhosts.confcode
# 在配置文件最后面增长新的虚拟主机配置 Listen 8909 <VirtualHost *:8909> ServerName wsgi.group8.example.com WSGIScriptAlias / /var/www/html/webinfo.wsgi </VirtualHost>
# 下载文件到指定目录 wget -O /var/www/html/webinfo.wsgi http://server.group8.example.com/pub/webinfo.wsgi
二、安装模块包
yum install mod_wsgi -y
三、添加防火墙规则
firewall-cmd --permanent --add-rich-rule 'rule family="ipv4" port port=8909 protocol=tcp accept' firewall-cmd --reload
四、重启服务
systemctl restart httpd
五、验证:服务端测试
curl http://wsgi.group8.exampl.com:8909