How to disable ModSecurity in Directadmin?

David Beroff

Well-known member
Joined
Jun 14, 2016
Messages
1,080
Best answers
0
Ratings
110 1
Points
63
#1
My website script required to disable ModSecurity in Directadmin to make functions work exactly. How can I disable ModSecurity in Directadmin? if I disable this feature, does it affect to security of my web hosting or websites?
 

HostechSupport

Active member
Joined
Jan 19, 2013
Messages
68
Best answers
1
Ratings
17
Points
8
#2
If you are using ModSecurity on your server with DirectAdmin, you sometimes need to disable mod_security on the server.

Default custombuild installation, mod_security rules installed in:

/etc/modsecurity.d/
Apache load’s ModSecurity modules and configuration in:

/etc/httpd/conf/extra/httpd-modsecurity.conf
Disable mod_security
Easiest way disable Modsecurity is disable apache to load ModSecurity module in https-modsecurity.conf file.

Add #comment’s to start LoadModule directive:

httpd-modsecurity.conf
LoadFile /usr/local/lib/libxml2.so
#LoadModule security2_module /usr/lib/apache/mod_security2.so
<ifmodule mod_security2.c>
# Default recommended configuration
SecRuleEngine On
SecRequestBodyAccess On
.
.
.
</ifmodule>
SecRuleEngine

Another method if you wanna keep ModSecurity module loaded to apache is change SecRuleEngine to Off

SecRuleEngine Off
 

bountysite

Corporate Member
Corporate Member
Joined
Oct 11, 2017
Messages
91
Best answers
1
Ratings
43
Points
18
#4
Yes, disabling mod_security may affect security. That is the purpose of mod_security.

Though, if you keep all applications updated, you should be good.
 
Joined
May 24, 2019
Messages
10
Best answers
0
Ratings
1
Points
3
#6
Disabling ModSecurity for a VirtualHost
# Login right into DirectAdmin as admin,
# Most likely to "Add Personalized Httpd Arrangements" web page,
# Select a wish domain name.
# Area code in a textarea: |? SEC_RULE_ENGINE=OFF |
# as well as likewise preserve changes.
# wait a min or more and additionally see end results.
 

bountysite

Corporate Member
Corporate Member
Joined
Oct 11, 2017
Messages
91
Best answers
1
Ratings
43
Points
18
#7
You can also have a WAF and route other website traffic through it.
 
Latest Threads
Replies
0
Views
1
Replies
0
Views
2
Replies
1
Views
10
Replies
2
Views
28
Recommended Threads

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top