{"id":373,"date":"2009-12-01T09:33:34","date_gmt":"2009-12-01T13:33:34","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=373"},"modified":"2013-05-07T05:06:29","modified_gmt":"2013-05-07T09:06:29","slug":"howto-disable-mod-security-for-an-account","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/howto-disable-mod-security-for-an-account","title":{"rendered":"Howto: disable Mod Security for an account"},"content":{"rendered":"<blockquote><p><span style=\"color: #0000ff;\"><strong>How to Turn off Mod Security OR How to disable Mod Security for an account?<br \/>\n<\/strong><\/span><\/p><\/blockquote>\n<p>Mod_Security for an account is turned off\/disabled on depending upon the version of Mod_Security i.e. it can be disabled in .htaccess file in modsecurity1 and have to disable it in VirtualHost entry of a domain in modsecurity2.<strong> <\/strong><span style=\"color: #0000ff;\"><strong>Apache 1.x supports Mod Security1 and Apache 2.x supports Mod Securiry2.<\/strong><\/span> <strong>To find out the version of Apache, execute <\/strong><\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>httpd -v<\/strong><\/span><\/p><\/blockquote>\n<p><span style=\"color: #0000ff;\"><span style=\"text-decoration: underline;\"><strong>Mod Security1:<\/strong><\/span><\/span><\/p>\n<p>Create a .htaccess file in an account<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>vi .htaccess<\/strong><\/span><\/p><\/blockquote>\n<p>and insert the following:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>&lt;IfModule mod_security.c&gt;<br \/>\nSecFilterEngine Off<br \/>\nSecFilterScanPOST Off<br \/>\n&lt;\/IfModule&gt;<\/strong><\/span><\/p><\/blockquote>\n<p><span style=\"color: #0000ff;\"><strong><span style=\"text-decoration: underline;\">Mod Security2:<\/span><\/strong><\/span><\/p>\n<p><strong>You cannot disable mod security in a .htaccess file here<\/strong> (it&#8217;s setup this way to enhance security). You have to turn off mod security in the VirtualHost of the domain in the Apache configuration file. Edit the configuration file:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>vi \/etc\/httpd\/conf\/httpd.conf<\/strong><\/span><\/p><\/blockquote>\n<p>scroll down to the VirtualHost of the domain and place the following lines:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>&lt;IfModule mod_security2.c&gt;<br \/>\nSecRuleEngine Off<br \/>\n&lt;\/IfModule&gt;<\/strong><\/span><\/p><\/blockquote>\n<p>Save the configuration file and restart the Apache service.<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>service httpd restart<\/strong><\/span><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>How to Turn off Mod Security OR How to disable Mod Security for an account?<\/p>\n<p>Mod_Security for an account is turned off\/disabled on depending upon the version of Mod_Security i.e. it can be disabled in .htaccess file in modsecurity1 and have to disable it in VirtualHost entry of a domain in modsecurity2. Apache 1.x supports Mod Security1 and Apache 2.x supports Mod Securiry2. To find out the version of Apache, execute<br \/>\nhttpd -v<br \/>\nMod Security1:<br \/>\nCreate a .htaccess file in an account<br \/>\nvi .htaccess<br \/>\nand insert the following:<br \/>\n&lt;IfModule mod_security.c&gt;<br \/>\nSecFilterEngine Off<br \/>\nSecFilterScanPOST Off<br \/>\n&lt;\/IfModule&gt;<br \/>\nMod Security2:<br \/>\nYou cannot [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[494,498,493,497,496,500,492,491,499,495],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/373"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=373"}],"version-history":[{"count":6,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/373\/revisions"}],"predecessor-version":[{"id":378,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/373\/revisions\/378"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}