Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/top_msg.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/linux/CentOS/web_server/mod_security_install/mod_security_install.html on line 21
Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/top_msg.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/linux/CentOS/web_server/mod_security_install/mod_security_install.html on line 21
目次 |
---|
・mod_securityのインストール ・mod_securityの設定ファイル ・mod_securityの反映 |
[root@centos~]yum -y install mod_securityと実行します。
[root@centos~]/etc/rc.d/init.d/httpd restartこの時、以下のようなエラーが表示される場合があるかもしれません。
httpd を起動中: httpd: Syntax error on line 212 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /etc/httpd/conf.d/mod_security.conf: Cannot load /etc/httpd/modules/mod_security2.so into server: /etc/httpd/modules/mod_security2.so: undefined symbol: ap_get_server_banner上記エラーが表示されたら、apacheのバージョンを確認します。
[root@centos~]/usr/sbin/httpd -v Server version: Apache/2.2.3 Server built: Jul 14 200X XX:XX:XXバージョンが2.2.3の為、2.2.4以上にあげる必要があります。
[root@centos~]yum -y update httpd : [root@centos~]/usr/sbin/httpd -v Server version: Apache/2.2.13 (Unix) Server built: Sep 22 200X XX:XX:XXこれでバージョンが2.2.3から2.2.13にあがりました。
[root@centos~]/etc/rc.d/init.d/httpd start httpd を起動中: [ OK ]通常に起動されるようになります。