<?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>Toey blog &#187; reverse proxy</title>
	<atom:link href="http://toey.tc20.net/tag/reverse-proxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://toey.tc20.net</link>
	<description>บันทึกเรื่องราวต่างๆ</description>
	<lastBuildDate>Thu, 01 Sep 2011 11:51:51 +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>การติดตั้ง mod_rpaf &#8211; reverse proxy add forward</title>
		<link>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-mod_rpaf-reverse-proxy-add-forward/</link>
		<comments>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-mod_rpaf-reverse-proxy-add-forward/#comments</comments>
		<pubDate>Sun, 24 May 2009 19:40:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[Linux How to]]></category>
		<category><![CDATA[reverse proxy]]></category>

		<guid isPermaLink="false">http://toey.tc20.net/?p=7</guid>
		<description><![CDATA[ปัญหาเกิดจากเมื่อใช้ squid ทำ reverse proxy แล้ว ip ใน log ของ apache กลายเป็น ip ของเครื่องเรา มาแก้ปัญหากันเลย wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz tar -xvzf mod_rpaf-0.6.tar.gz cd mod_rpaf-0.6 apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c นำข้อความด้านล่างไปใส่ใน httpd.conf แล้วจัดการเซฟ LoadModule rpaf_module /usr/lib/apache/mod_rpaf-2.0.so #Reverse proxy RPAFenable On RPAFsethostname On RPAFproxy_ips 127.0.0.1 xxx.xxx.xxx.xxx &#60;-- เปลี่ยนเป็นไอพีเครื่องเราเช่น 122.155.3.59 RPAFheader X-Forwarded-For สั่ง restart apache #/etc/init.d/httpd restart เป็นอันเสร็จครับเท่านี้ใน log [...]]]></description>
			<content:encoded><![CDATA[<p>ปัญหาเกิดจากเมื่อใช้ squid ทำ reverse proxy แล้ว ip ใน log ของ apache กลายเป็น ip ของเครื่องเรา<br />
มาแก้ปัญหากันเลย</p>
<pre class="brush: shell;">wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz
tar -xvzf mod_rpaf-0.6.tar.gz
cd mod_rpaf-0.6
apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c
</pre>
<p>นำข้อความด้านล่างไปใส่ใน httpd.conf แล้วจัดการเซฟ</p>
<pre class="brush: shell;">
LoadModule rpaf_module /usr/lib/apache/mod_rpaf-2.0.so

#Reverse proxy
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1 xxx.xxx.xxx.xxx &lt;-- เปลี่ยนเป็นไอพีเครื่องเราเช่น 122.155.3.59
RPAFheader X-Forwarded-For
</pre>
<p>สั่ง restart apache</p>
<pre class="brush: shell;">#/etc/init.d/httpd restart</pre>
<p>เป็นอันเสร็จครับเท่านี้ใน log apache เราก็จะได้ ip ที่ถูกต้อง</p>
]]></content:encoded>
			<wfw:commentRss>http://toey.tc20.net/2009/05/25/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-mod_rpaf-reverse-proxy-add-forward/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

