crenet
Verified User
- Joined
- Sep 23, 2019
- Messages
- 115
Hi,
Initially I set owasp
cd /usr/local/directadmin/custombuild
./build set modsecurity yes
./build set modsecurity_ruleset owasp
./build modsecurity
./build apache
./build rewrite_confs
Then I change it to Comodo
cd /usr/local/directadmin/custombuild
./build set modsecurity_ruleset comodo
./build modsecurity
./build modsecurity_rules
./build rewrite_confs
Is there something wrong here ? Do I need to rebuild apache ?
Then I followed this guide and I can not get the ModSecurity working.
help.poralix.com
Everything goes well till I create the /etc/httpd/conf/extra/httpd-custom-modsecurity.conf
After this the https goes down and does not restart anymore
As soon as I remove the
Include /etc/httpd/conf/extra/httpd-custom-modsecurity.conf
from /etc/httpd/conf/httpd.conf
Apache restarts
Anybody knows where do I find the https.conf file to remover the ssl:warm for www.domain.com (default) virtual host ?
UPDATE: OS Debian 9.3 does not have the /etc/modsecurity2 after this setup.
I thought this DA build will install the package....
Should I do any other steps or a different order ?
This is the apache error.log
[Mon Nov 25 17:02:22.264736 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity for Apache/2.9.3 (http://www.modsecurity.org/) configured.
[Mon Nov 25 17:02:22.264747 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity: APR compiled version="1.6.5"; loaded version="1.6.5"
[Mon Nov 25 17:02:22.264758 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity: PCRE compiled version="8.43 "; loaded version="8.43 2019-02-23"
[Mon Nov 25 17:02:22.264768 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity: LIBXML compiled version="2.9.9"
[Mon Nov 25 17:02:22.264777 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Mon Nov 25 17:02:23.707901 2019] [ssl:warn] [pid 23195:tid 139645556480128] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 25 17:02:23.708633 2019] [ssl:warn] [pid 23195:tid 139645556480128] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 25 17:02:23.709006 2019] [lbmethod_heartbeat:notice] [pid 23195:tid 139645556480128] AH02282: No slotmem from mod_heartmonitor
[Mon Nov 25 17:02:23.748357 2019] [mpm_event:notice] [pid 23195:tid 139645556480128] AH00489: Apache/2.4.41 (Unix) OpenSSL/1.1.0l configured -- resuming normal operations
[Mon Nov 25 17:02:23.748467 2019] [core:notice] [pid 23195:tid 139645556480128] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Nov 25 17:15:05.306204 2019] [mpm_event:notice] [pid 23195:tid 139645556480128] AH00493: SIGUSR1 received. Doing graceful restart
[Mon Nov 25 17:15:08.211634 2019] [ssl:warn] [pid 23195:tid 139645556480128] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 25 17:15:08.214142 2019] [ssl:warn] [pid 23195:tid 139645556480128] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 25 17:15:08.214670 2019] [lbmethod_heartbeat:notice] [pid 23195:tid 139645556480128] AH02282: No slotmem from mod_heartmonitor
[Mon Nov 25 17:15:08.215319 2019] [mpm_event:notice] [pid 23195:tid 139645556480128] AH00489: Apache/2.4.41 (Unix) OpenSSL/1.1.0l configured -- resuming normal operations
[Mon Nov 25 17:15:08.215378 2019] [core:notice] [pid 23195:tid 139645556480128] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Nov 25 17:20:53.007633 2019] [mpm_event:notice] [pid 23195:tid 139645556480128] AH00492: caught SIGWINCH, shutting down gracefully
Initially I set owasp
cd /usr/local/directadmin/custombuild
./build set modsecurity yes
./build set modsecurity_ruleset owasp
./build modsecurity
./build apache
./build rewrite_confs
Then I change it to Comodo
cd /usr/local/directadmin/custombuild
./build set modsecurity_ruleset comodo
./build modsecurity
./build modsecurity_rules
./build rewrite_confs
Is there something wrong here ? Do I need to rebuild apache ?
Then I followed this guide and I can not get the ModSecurity working.
How to manage ModSecurity with DirectAdmin
If you decided to use Modsecurity on your server with DirectAdmin, there is sometimes a need to disable the module for a particular domain (virtual host). And here I'm going to describe how to achieve the desired.
Everything goes well till I create the /etc/httpd/conf/extra/httpd-custom-modsecurity.conf
After this the https goes down and does not restart anymore
As soon as I remove the
Include /etc/httpd/conf/extra/httpd-custom-modsecurity.conf
from /etc/httpd/conf/httpd.conf
Apache restarts
Anybody knows where do I find the https.conf file to remover the ssl:warm for www.domain.com (default) virtual host ?
UPDATE: OS Debian 9.3 does not have the /etc/modsecurity2 after this setup.
I thought this DA build will install the package....
Should I do any other steps or a different order ?
This is the apache error.log
[Mon Nov 25 17:02:22.264736 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity for Apache/2.9.3 (http://www.modsecurity.org/) configured.
[Mon Nov 25 17:02:22.264747 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity: APR compiled version="1.6.5"; loaded version="1.6.5"
[Mon Nov 25 17:02:22.264758 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity: PCRE compiled version="8.43 "; loaded version="8.43 2019-02-23"
[Mon Nov 25 17:02:22.264768 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity: LIBXML compiled version="2.9.9"
[Mon Nov 25 17:02:22.264777 2019] [:notice] [pid 23195:tid 139645556480128] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Mon Nov 25 17:02:23.707901 2019] [ssl:warn] [pid 23195:tid 139645556480128] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 25 17:02:23.708633 2019] [ssl:warn] [pid 23195:tid 139645556480128] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 25 17:02:23.709006 2019] [lbmethod_heartbeat:notice] [pid 23195:tid 139645556480128] AH02282: No slotmem from mod_heartmonitor
[Mon Nov 25 17:02:23.748357 2019] [mpm_event:notice] [pid 23195:tid 139645556480128] AH00489: Apache/2.4.41 (Unix) OpenSSL/1.1.0l configured -- resuming normal operations
[Mon Nov 25 17:02:23.748467 2019] [core:notice] [pid 23195:tid 139645556480128] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Nov 25 17:15:05.306204 2019] [mpm_event:notice] [pid 23195:tid 139645556480128] AH00493: SIGUSR1 received. Doing graceful restart
[Mon Nov 25 17:15:08.211634 2019] [ssl:warn] [pid 23195:tid 139645556480128] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 25 17:15:08.214142 2019] [ssl:warn] [pid 23195:tid 139645556480128] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Nov 25 17:15:08.214670 2019] [lbmethod_heartbeat:notice] [pid 23195:tid 139645556480128] AH02282: No slotmem from mod_heartmonitor
[Mon Nov 25 17:15:08.215319 2019] [mpm_event:notice] [pid 23195:tid 139645556480128] AH00489: Apache/2.4.41 (Unix) OpenSSL/1.1.0l configured -- resuming normal operations
[Mon Nov 25 17:15:08.215378 2019] [core:notice] [pid 23195:tid 139645556480128] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Nov 25 17:20:53.007633 2019] [mpm_event:notice] [pid 23195:tid 139645556480128] AH00492: caught SIGWINCH, shutting down gracefully
Last edited: