Apache

Table of Contents

webサーバの設定

インストール

# dnf install httpd

ウェルカムページをリネーム

# mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.org

設定

# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.org
# vi /etc/httpd/conf/httpd.conf
-----------------------------------------------
ServerAdmin webmaster@chinaz.org
ServerName www.chinaz.org:80
-----------------------------------------------

動作状況確認の設定

# vi /etc/httpd/conf.modules.d/00-base.conf
-----------------------------------------------
LoadModule status_module modules/mod_status.so
-----------------------------------------------
# vi /etc/httpd/conf.d/status.conf
-----------------------------------------------
<Location /server-status>
    SetHandler server-status
    Require all denied
    Require ip 192.168.xxx.
</Location>
-----------------------------------------------

設定ファイルのチェック

# apachectl configtest
Syntax OK

起動設定

# systemctl enable httpd
# systemctl start httpd

ポートのオープン

# firewall-cmd --zone=external --add-service=http --permanent
# firewall-cmd --zone=internal --add-service=http --permanent
# firewall-cmd --reload
# firewall-cmd --list-all-zones

動作状況の確認

http://www.chinaz.org/server-status/

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です