<?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>AnnoMundi's Weblog &#187; Drupal</title>
	<atom:link href="http://www.annomundi.info/category/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.annomundi.info</link>
	<description>AM, "in the year of the world"</description>
	<lastBuildDate>Mon, 20 Jul 2009 12:02:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ปัญหาการใช้งาน Drupal หลังลง mod_security</title>
		<link>http://www.annomundi.info/2006/10/30/%e0%b8%9b%e0%b9%8d%e0%b8%8d%e0%b8%ab%e0%b8%b2%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99-drupal-%e0%b8%ab%e0%b8%a5%e0%b8%b1%e0%b8%87%e0%b8%a5%e0%b8%87-mod_securit/</link>
		<comments>http://www.annomundi.info/2006/10/30/%e0%b8%9b%e0%b9%8d%e0%b8%8d%e0%b8%ab%e0%b8%b2%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99-drupal-%e0%b8%ab%e0%b8%a5%e0%b8%b1%e0%b8%87%e0%b8%a5%e0%b8%87-mod_securit/#comments</comments>
		<pubDate>Mon, 30 Oct 2006 04:13:34 +0000</pubDate>
		<dc:creator>AnnoMundi</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Linux :Howto & Tips]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.annomundi.info/2006/10/30/39/</guid>
		<description><![CDATA[พอดีวันก่อนผมได้ทำการลง mod_security บนเครื่อง Colocated Server ซึ่งใช้ Gentoo
ซึ่งก็คิดว่าคงเรียบร้อย แต่วันนี้เข้าใช้งานเว็ปและต้องโพสท์กระทู้ กลับมีปัญหาคือไม่สามารถ
โพสท์ได้ เลยลองเซ็ค Log ของ apache ดูก็พบ error ตามด้านล่าง
mod_security: Access denied with code 500. Pattern match "multipart/form-data" at HEADER
ผมถึงได้รู้ว่าบาง Rules ของ mod_security  เป็นสาเหตุทำให้ไม่สามารถโพสท์หรือแก้ไข content
ซึ่งผมไม่แน่ใจว่าเว็ปอื่นๆบนเครื่องจะมีปัญหาหรือเปล่า อย่างเว็ปที่ใช้ Joomla แต่ผมก็ได้ทำการ
แก้ไข ไฟล์  /etc/apache2/modules.d/99_mod_security.conf โดยแก้ไข rule ตรง
SecFilterForceByteRange เป็นดังด้านล่าง
SecFilterForceByteRange 1 255
และยกเลิก Rule หรือแก้ไขด้านล่างนี้ ถ้ายกเลิก ก็ใส่ # ด้านหน้าบรรทัดซะ
SecFilterSelective "HTTP_CONTENT_TYPE" multipart/form-data
หรือถ้าไม่ยกเลิก็ทำการแก้ไขให้ rule เป็นดังด้านล่างนี้ (ควรเปลี่ยนมากว่ายกเลิก)
 [...]]]></description>
			<content:encoded><![CDATA[<p>พอดีวันก่อนผมได้ทำการลง mod_security บนเครื่อง Colocated Server ซึ่งใช้ Gentoo<br />
ซึ่งก็คิดว่าคงเรียบร้อย แต่วันนี้เข้าใช้งานเว็ปและต้องโพสท์กระทู้ กลับมีปัญหาคือไม่สามารถ<br />
โพสท์ได้ เลยลองเซ็ค Log ของ apache ดูก็พบ error ตามด้านล่าง</p>
<p><code>mod_security: Access denied with code 500. Pattern match "multipart/form-data" at HEADER</code></p>
<p>ผมถึงได้รู้ว่าบาง Rules ของ mod_security  เป็นสาเหตุทำให้ไม่สามารถโพสท์หรือแก้ไข content<br />
ซึ่งผมไม่แน่ใจว่าเว็ปอื่นๆบนเครื่องจะมีปัญหาหรือเปล่า อย่างเว็ปที่ใช้ Joomla แต่ผมก็ได้ทำการ<br />
แก้ไข ไฟล์  /etc/apache2/modules.d/99_mod_security.conf โดยแก้ไข rule ตรง<br />
SecFilterForceByteRange เป็นดังด้านล่าง</p>
<p><code>SecFilterForceByteRange 1 255</code></p>
<p>และยกเลิก Rule หรือแก้ไขด้านล่างนี้ ถ้ายกเลิก ก็ใส่ # ด้านหน้าบรรทัดซะ</p>
<p><code>SecFilterSelective "HTTP_CONTENT_TYPE" multipart/form-data</code></p>
<p>หรือถ้าไม่ยกเลิก็ทำการแก้ไขให้ rule เป็นดังด้านล่างนี้ (ควรเปลี่ยนมากว่ายกเลิก)<br />
<code> SecFilterSelective HTTP_Content-Type "!(^$|^application/x-www-form-urlencoded$|^multipart/form-data;)"</code></p>
<p>ทั้งนี้ถ้าไม่สามารถแก้ไขไฟล์ 99_mod_security.conf ได้เองเพราะไม่ได้เป็น Admin<br />
ก็ให้แก้ขในไฟล์ .htaccess ใน htdocs หรือ public_html ถ้าเว็ปนั้นเปิดใช้ mod_rewrite<br />
เว็ปก็จะกลับมาใช้งานได้ตามปกติ<br />
<h3>บทความที่เกี่ยวข้อง</h3>
<ul class="related_post">
<li><a href="http://www.annomundi.info/2006/11/10/upgrade-gentoo-in-my-colocated-server-part2/" title="เริ่มการอัพเกรด Gentoo ในเครื่องโคโล ตอนที่ 2">เริ่มการอัพเกรด Gentoo ในเครื่องโคโล ตอนที่ 2</a></li>
<li><a href="http://www.annomundi.info/2006/11/09/upgrade-gentoo-in-my-colocated-server-part1/" title="เริ่มการอัพเกรด Gentoo ในเครื่องโคโล ตอนที่ 1">เริ่มการอัพเกรด Gentoo ในเครื่องโคโล ตอนที่ 1</a></li>
<li><a href="http://www.annomundi.info/2006/11/08/my-story-about-gentoo-part1/" title="เรื่องกลุ้มๆเกี่ยวกับ Gentoo ตอนที่ 1">เรื่องกลุ้มๆเกี่ยวกับ Gentoo ตอนที่ 1</a></li>
<li><a href="http://www.annomundi.info/2006/08/09/%e0%b8%ad%e0%b8%b2%e0%b8%97%e0%b8%b4%e0%b8%95%e0%b8%a2%e0%b9%8c%e0%b8%97%e0%b8%b5%e0%b9%88%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99%e0%b8%a1%e0%b8%b2%e0%b8%81%e0%b8%b1%e0%b8%9a%e0%b9%80%e0%b8%a3%e0%b8%b7e/" title="อาทิตย์ที่ผ่านมากับเรื่องวุ่นๆ">อาทิตย์ที่ผ่านมากับเรื่องวุ่นๆ</a></li>
<li><a href="http://www.annomundi.info/2006/07/19/%e0%b8%84%e0%b8%a3%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b9%81%e0%b8%a3%e0%b8%81%e0%b8%81%e0%b8%b1%e0%b8%9a-gentoo-linux-14/" title="ครั้งแรกกับ Gentoo Linux 1.4">ครั้งแรกกับ Gentoo Linux 1.4</a></li>
<li><a href="http://www.annomundi.info/2008/09/27/upgrade-virtualbox/" title="Upgrade VirtualBox">Upgrade VirtualBox</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.annomundi.info/2006/10/30/%e0%b8%9b%e0%b9%8d%e0%b8%8d%e0%b8%ab%e0%b8%b2%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99-drupal-%e0%b8%ab%e0%b8%a5%e0%b8%b1%e0%b8%87%e0%b8%a5%e0%b8%87-mod_securit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.070 seconds -->
