Control Web Panel

WebPanel => CentOS 6 Problems => Topic started by: tristar78 on April 28, 2017, 03:43:12 PM

Title: upgrade after apache error & fix
Post by: tristar78 on April 28, 2017, 03:43:12 PM
my system
Code: [Select]
CentOS release 6.9 (Final)
Apache version: Apache/2.4.25
PHP version: 5.4.45 [PHP Switcher]
MySQL version: 5.5.48
FTP version: 1.0.36

hello i've just upgrade.
get this error after upgrade from restarting apache.


Code: [Select]
Starting httpd: AH00526: Syntax error on line 11 of /usr/local/apache/conf.d/mod_security.conf
Invalid ServerName "*" use ServerAlias to set multiple server names.

Quote
LoadFile /usr/lib64/libxml2.so
LoadFile /usr/lib64/liblua-5.1.so
LoadModule security2_module modules/mod_security2.so

<IfModule mod_security2.c>
   SecPcreMatchLimit 1000000
   SecPcreMatchLimitRecursion 1000000
   SecDataDir logs/tmp
</IfModule>

ServerName *

AddDefaultCharset UTF-8
<IfModule mod_security2.c>
   Include /usr/local/apache/modsecurity-crs/modsecurity_crs_10_config.conf
   Include /usr/local/apache/modsecurity-crs/base_rules/*.conf
   SecRuleEngine On
   SecRequestBodyAccess On
   SecResponseBodyAccess On
   SecResponseBodyLimit 546870912
   SecRequestBodyInMemoryLimit 546870912
   Include /usr/local/apache/conf/mod_sec_disabled_rules.conf
</IfModule>

i've removed line that ServerName * from mod_securty.conf file.
apache restart good. its working.
But i am not sure good idea removing that line.

any suggestion would be appriciated. thanks.

ps:
if someone share own mod_securty.conf file maybe i can evalauate it.

thanks..
Title: Re: upgrade after apache error & fix
Post by: Administrator on April 29, 2017, 07:42:00 AM
try uninstall and then again install mod security.
Title: Re: upgrade after apache error & fix
Post by: tristar78 on April 29, 2017, 08:16:12 AM
try uninstall and then again install mod security.

thanx i tested it works goods now. dont forget backup disabled rules before reinstall mod security.