Show Table of Contents
2.2. 網站伺服器配置
下列程序將配置一個 Apache 網站伺服器。
- 確認 Apache HTTPD 伺服器已安裝在叢集中的各個節點上。您也必須在叢集上安裝
wget工具,以檢查 Apache 網站伺服器的狀態。請在各個節點上執行以下指令。#
yum install -y httpd wget - 若要讓 Apache 資源代理程式能夠取得 Apache 網站伺服器的狀態,請確認下列文字是否有出現在叢集中各個節點上的
/etc/httpd/conf/httpd.conf檔案中,並確認這些文字未被標記為註解。若這些文字不存在,請將它們附加至檔案尾端。<Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 </Location>
- 建立一個網頁來讓 Apache 提供服務。請在叢集中的一個節點上掛載您在〈節 2.1, “為一個 LVM 卷冊配置 ext4 檔案系統”〉中建立的檔案系統、在該檔案系統上建立
index.html檔案,然後卸載此檔案系統。#
mount /dev/my_vg/my_lv /var/www/#mkdir /var/www/html#mkdir /var/www/cgi-bin#mkdir /var/www/error#restorecon -R /var/www#cat <<-END >/var/www/html/index.html<html><body>Hello</body></html>END#umount /var/www

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.