rhel7 http实例3
rhel7 http實例3
前面的配置請參考:
rhel7 http實例:http://4708948.blog.51cto.com/4698948/1702486
rhel7 http實例2 :http://4708948.blog.51cto.com/4698948/1702487
題目14
配置虛擬主機
在server0上擴展您的web服務器,為站點
http://14.example.com創建了個虛擬主機,然后執行下述步驟:
A設置document Root 為/var/www/virtual
B 從ftp://172.25.254.250/pub/RHCE/14.html下載文件并重名名為index.html不要對文件index.html的內容做任何修改
C 將文件index.html放到虛擬的documentRoot目錄下
D 確保floyd用戶能夠在/var/www/virtual目錄下創建文件
注意:原始站點http://server0.example.com必須仍然能夠訪問
配置WEB內容的訪問
在您的server0上的web服務器的documentRoot目錄下創建一個名為private的目錄,要求如下
A 從ftp://172.25.254.250/pub/RHCE/15.html下載一個文件副本到這個目錄,并且生命名為index.html
B 不要對這個文件的內容做任何修改
C 在server0上,任何人都可以瀏覽private的內容,但是從其他系統不能訪問這個目錄的內容
服務器
[root@server0 conf.d]# vim hrr.conf
[root@server0 conf.d]# systemctl restart httpd
[root@server0 conf.d]# curl http://www.server0.example.com/restricted/
desktop0 only
[root@server0 conf.d]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.25.0.11 netmask 255.255.255.0 broadcast 172.25.0.255
客戶機
[root@desktop0 conf.d]# curl http://www.server0.example.com/restricted/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
You don't have permission to access /restricted/
on this server.
</body></html>
[root@desktop0 conf.d]# curl http://www.server0.example.com
151515151515151515151515151515
[root@desktop0 conf.d]#
[root@desktop0 conf.d]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.25.0.10 netmask 255.255.255.0 broadcast 172.25.0.255
實現動態WEB內容
在server上配置提供動態web內容,要求如下:
A 動態內容名為16.example.com的虛擬主機提供
B 虛擬主機偵聽在端口8909
C 從ftp://172.25.254.250/pub/RHCE/webinfo.wsgi下載一個腳本,然后放在適當的位置,無論如何都不要修改此文件的內容
D 客戶端訪問http://14.example.com:8009/必須被example.com域內的所有系統訪問
轉載于:https://blog.51cto.com/4708948/1702489
總結
以上是生活随笔為你收集整理的rhel7 http实例3的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 开博第一发
- 下一篇: [Swift]UIKit学习之UISeg