2008年08月17日 16:36
Apache HTTP Server
WWWサーバーソフトウェアのスタンダード。
CentOSではデフォルトでインストールされている。
サービス名:httpd
Apacheの利用のためにファイアウォールの調整
パケットファイルタリングの設定
HTTPと、HTTPSで使用する80番と443番のポートをあけるために以下のようにiptablesを入力する。
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
しかし、うまくいかず挫折・・・
結局、system-config-securitylevel-tuiを利用してHTTPとHTTPSのポートを完全に開放する。
system-config-securitylevel-tuiを使うと、ポートを開きすぎちゃってあまりよくないともいうが、初心者には、こまかな設定は難しい・・・
SELinuxの設定
setsebool -P <論理パラメータ名>
でひとつひとつ設定しようとするが、あまりにも面倒なので
結局GUIのSELinuxAdministrationから下のようにおこなった。
HTTPD関連のSELinux論理パラメータ
allow_httpd_anon_write
GUI: Allow httpd daemon to write files in directories labeled public_content_rw_t
デフォルト:off
WebDAVを利用する場合はON
allow_httpd_mod_auth_pam
GUI;:Allow apache to use mod_auth_pam
デフォルト:off
Apacheをつかって認証を利用する場合はON
allow_httpd_sys_script_anon_write
GUI:Allow httpd scripts to write files in directories labels public_content_rw_t
デフォルト:off
htttpdのスクリプトを利用してファイルのアップロードを行う場合はON
httpd_bulitin_scripting
GUI:Allow HTTPD to support build-in scripting
デフォルト:ON
PHP等のビルドインスクリプトを利用する場合はON
httpd_can_network_connect
GUI:Allow HTTPD scripts and modules to connect to the network
デフォルト:off
httpdのスクリプトに対してネットワークからの接続を許可する場合はON
offがおすすめ。
httpd_can_netwpork_connect_db
GUI:Allow HTTPD scripts and modules to connect to the databases
デフォルト:off
httpdのスクリプトに対してネットワークDBからの接続を許可する場合はON
offがおすすめ。
httpd_can_network_relay
GUI:Allow httpd to act as relay
デフォルト:off
httpdのスクリプトにタオいしてネットワークの中継を許可する場合はON
offがおすすめ
httpd_disable_trans
GUI:Disable SELinux protextion for httpd daemon
デフォルト:off
onにするとhttpdがSELinuxの保護対象でなくなる。
httpd_enable_cgi
GUI:Allow HYTTPD cgi support
デフォルト:on
httpdがCGIを実行可能にする。
httpd_enable_ftp_server
GUI:Allow HTTPD to run as a ftp server
デフォルト:off
httpdに対して、ftpを利用した接続を許可する場合はon
httpd_enable_homedirs
GUI:Allow HTTPD to read home directories
デフォルト:off
WWWサーバーでユーザーのホームディレクトリを公開する場合はON
httpd_rotatelogs_disable_trans
GUI:Disable SElinux protection for httpd rotatelogs
デフォルト:off
Onにするとローテートされたhttpdのログが保護対象から外れる
httpd_ssi_exec
GUI:Allow HTTPD to run SSI executables in the same domain as system CGI scripts
デフォルト:off
httpdがssiを実行できるように許可する場合はON
httpd_suexec_disable_trans
GUI:Disable SELinux protection for http suexec
デフォルト:off
onにするとsuの実施が保護対象から外れる
httpd_tty_comm
GUI:Unify HTTPD to communicate with the terminal.Needed for handling certifications
デフォルト:off
httpを利用したターミナル通信を許可する場合はOn
offがおすすめ
httpd_unified
GUI:Unify HTTPD handling of all content files
デフォルト:on
httpdによる書き込みなどをきょかするかの設定。
offにするとPHPなどが動かなくなるかも。
コメント
コメントの投稿