<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HowConfig &#187; mod security</title>
	<atom:link href="http://www.howconfig.com/tag/mod-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.howconfig.com</link>
	<description>Quick tips on software configuration.</description>
	<lastBuildDate>Fri, 13 Jan 2012 12:55:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Plesk for Linux &#8211; Disabling mod_security rules for specific directory</title>
		<link>http://www.howconfig.com/linux/plesk-for-linux-disabling-mod_security-rules-for-specific-directory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=plesk-for-linux-disabling-mod_security-rules-for-specific-directory</link>
		<comments>http://www.howconfig.com/linux/plesk-for-linux-disabling-mod_security-rules-for-specific-directory/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 20:40:42 +0000</pubDate>
		<dc:creator>config</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[mod security]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[plesk linux]]></category>

		<guid isPermaLink="false">http://www.howconfig.com/?p=28</guid>
		<description><![CDATA[If you are working with Plesk Control Panel ( Linux version ) and mod security &#8211; you probably encountered some problems with specific scripts. Sometimes mod security block certain functions of the script because it thinks it is malicious code. For example this warning taken from Apache log: Warning. Match of "rx ^apache.*perl" against "REQUEST_HEADERS:User-Agent" [...]]]></description>
			<content:encoded><![CDATA[<p>If you are working with Plesk Control Panel ( Linux version ) and mod security &#8211; you probably encountered some problems with specific scripts. Sometimes mod security block certain functions of the script because it thinks it is malicious code.</p>
<p>For example this warning taken from Apache log:</p>
<pre>Warning. Match of "rx ^apache.*perl" against "REQUEST_HEADERS:User-Agent" required. [file "/etc/httpd/conf.d/modsecurity/modsecurity_crs_35_bad_robots.conf"] [line "27"] [id "990011"]</pre>
<p>Lets say you want to leave mod_security as it is without removing it or disabling on the server, what you want to do is to disable this specific rule (&#8220;990011&#8243;) for the specific directory in the domain and let your scripts work as it should.<br />
Here is a quick solution.</p>
<p>Create a file called vhost.conf in /var/www/vhosts/domain.com/conf<br />
containing the following:</p>
<pre>&lt;Directory /var/www/vhosts/domain.com/httpdocs&gt; SecRuleRemoveByID 990011 &lt;/Directory&gt;</pre>
<p>Then run this in terminal:</p>
<pre>/usr/local/psa/admin/bin/websrvmng -u --vhost-name=domain.com
service httpd restart</pre>
<p>This is specific to Redhat/Centos.<br />
If you cannot find websrvmng in the mentioned path you can try:</p>
<pre>updatedb
locate websrvmng</pre>
<p>Also pay attention that if you use Debian and Ubuntu or their derivatives, you cannot use the service command and your apache is not httpd.<br />
Try to use</p>
<pre>/etc/init.d/apache2 restart</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.howconfig.com/linux/plesk-for-linux-disabling-mod_security-rules-for-specific-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

