1->檔案系統 /home/Web37-1

2->建立 public_html 資料夾

3->在public_html 資料夾中 建立 index.html

4->在index.html上 鍵入歡迎詞

     網路架設術科-Web37-1號 羅安智的第1個網站

5->檔案系統 /home/Web37-2

6->建立 public_html 資料夾

7->在public_html 資料夾中 建立 index.html

8->在index.html上 鍵入歡迎詞

     網路架設術科-Web37-2號 羅安智的第2個網站

9->設定網頁資料夾存取權

chmod 711 /home/Web37-1

chmod 711 /home/Web37-2

chmod 755 /home/Web37-1/public_html

chmod 755 /home/Web37-2/public_html

10->建立https歡迎詞

/var/www 中,建立https資料夾

/var/www/https中,建立index.html

在index.html中 建立歡迎詞->網路架設術科-Web37-2號 羅安智的第二個網站

11->建立兩個上傳檔案 up1 , up2

    dd count=1400 if=/dev/zeri of=up1

    dd count=1400 if=/dev/zero of=up2

1->設定第二個網頁伺服器 /etc/httpd/conf.d/ssl.conf

第18行 Listen 10.1.37.2:443

第77行 改成 DocumentRoot "/var/www/https"  (加密網站的資料夾)

第86行 加入敘述

<Directory /home/Web37-2/public_html>  Web37-2的網頁根目錄

AuthType basic    身分驗證和密碼授權

AuthName "Web37-2 only"   客戶端輸入密碼的畫面提示語

AuthUserFile /etc/httpd/conf/passuser  帳號密碼存放在此

Require valid-user 需要具有帳號密碼的使用者

Deny from all  拒絕所有人進入

Allow from 200.100.37.1 允許PC2 ip位址 : 200.100.37.1進入

Order deny,allow  先拒絕再允許

</Directory>

1->建立使用者密碼

/etc/httpd/conf(組態檔)

建立passuser檔案 (按滑鼠右鍵,新增白檔案)

htpasswd -c /etc/httpd/conf/passuser Web37-2

2->設定第一個網頁伺服器

/etc/httpd/conf/httpd.conf

第136行  listen 10.1.37.1:80 (第一個網頁伺服器)

第366行 加入 # 不執行  --> # Userdir disable 

第373行 去除# -->UserDir public_html    (每個使用者可以建立網站)

第381~392行  去除# -->使用者跟目錄存取權

第1003行  去除#  <VirtualHost *:80>

第1005行  去除# , 同時改為 DocumentRoot /var/www

第1009行  去除#  <VirtualHost>

安裝好後

1->關閉防火牆

2->關閉物件存取限制  etc/selinux/config

     selinux=disable (第一行, 改成 disable)

3->編輯網路卡

     eth0->10.1.37.1 / 255.255.255.0 / 10.1.37.254 ,  網頁伺服器 1

               10.1.37.2 / 255.255.255.0 / 10.1.37.254 ,  網頁伺服器 2

               記得勾選自動連線喔

      eth1->200.100.37.254 / 255.255.255.0 / 10.1.37.254

                記得勾選自動連線喔