第一步驟:設定網路卡

    第一張網路卡 : eth0

    eth0: 10.1.31.1 / 24 / 10.1.31.254   eth0:10.1.31.2/24/10.1.31.254

    第二張網路卡 : eth1

    eth1: 200.100.31.254 / 24 / 不設gateway

第二步驟 : 設定防火牆

    setup->選設定防火牆->自訂->選www及https -> eth+ -> eth+ 偉裝

第三步驟 : 將 /etc/selinux/config 改成 disable

第四步驟: 重新開機 reboot

第五步驟 : 新增帳號

    useradd Web31-1 , useradd Web31-2

    passwd Web31-1 , passwd Web31-2

第六步驟 : 新增使用者資料夾

     mkdir /home/Web31-1/www  , mkdir /home/Web31-2/www

第七步驟 : 設定 /etc/httpd/conf/httpd.conf

    366行 userdir www

    560行 <Directory /home/Web31-2/www>

              AllowOverride all

              Order deny,allow

              Allow from 200.100.31.1

              Deny from all

           <Directory>

第八步驟 : 新增 index.html

第九步驟: 權限 

      chmod 755 /home/Web31-1

      chmod 755 /home/Web31-2

第10步驟 : 新增 Web31-2 密碼

      cd /home/Web31-2

      htpasswd -c .pw Web31-2

      /home/Web31-2/www 新增一個檔案 .htaccess 

     AuthType Basic

     AuthName "xxx"

     AuthUserFile /home/Web31-2/www/.pw

     Require valid-user

第11步驟 : service httpd start

第12步驟 : 測試

     http://10.1.200.200

     http://10.1.37.1/~Web37-1

     https://10.1.31.2/~Web37-2