Show Table of Contents
2.2. Web サーバーの設定
次の手順に従って Apache HTTP サーバーを設定します。
- Apache HTTP サーバーがクラスターの各ノードにインストールされているようにしてください。また、Apache HTTP サーバーの状態を確認するには、
wgetツールをクラスターにインストールする必要があります。各ノードで次のコマンドを実行します。#
yum install -y httpd wget - Apache リソースエージェントが Apache HTTP サーバーの状態を取得できるようにするため、クラスターの各ノードの
/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 で提供する web ページを作成します。クラスター内のいずれかのノードに 「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 apacheリソースエージェントを使用して Apache を管理する場合、systemdは使用されません。そのため、Apache のリロードにsystemctlが使用されないようにするため、Apache によって提供されるlogrotateスクリプトを編集する必要があります。/etc/logrotate.d/httpdファイルにある以下の行を削除します。/bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
削除した行を以下の行に置き換えます。/usr/sbin/httpd -f /etc/httpd/conf/httpd.conf -c "PidFile /var/run/httpd.pid" -k graceful > /dev/null 2>/dev/null || true

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.