<?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>Sat, 28 Aug 2010 22:20:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.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[Linux How to]]></category>
		<category><![CDATA[apache]]></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 ของเครื่องเรา มาแก้ปัญหากันเลย [root@demo01 ~]#wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz [root@demo01 ~]#tar -xvzf mod_rpaf-0.6.tar.gz [root@demo01 ~]#cd mod_rpaf-0.6 [root@demo01 ~]#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;&#8211; เปลี่ยนเป็นไอพีเครื่องเราเช่น 122.155.3.59 RPAFheader X-Forwarded-For สั่ง restart apache [...]]]></description>
			<content:encoded><![CDATA[<p>ปัญหาเกิดจากเมื่อใช้ squid ทำ reverse proxy แล้ว ip ใน log ของ apache กลายเป็น ip ของเครื่องเรา<br />
มาแก้ปัญหากันเลย</p>
<blockquote><p>[root@demo01 ~]#wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz<br />
[root@demo01 ~]#tar -xvzf mod_rpaf-0.6.tar.gz<br />
[root@demo01 ~]#cd mod_rpaf-0.6<br />
[root@demo01 ~]#apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c</p></blockquote>
<p>นำข้อความด้านล่างไปใส่ใน httpd.conf แล้วจัดการเซฟ</p>
<blockquote><p>LoadModule rpaf_module /usr/lib/apache/mod_rpaf-2.0.so</p>
<p>#Reverse proxy<br />
RPAFenable On<br />
RPAFsethostname On<br />
RPAFproxy_ips 127.0.0.1 xxx.xxx.xxx.xxx &lt;&#8211; เปลี่ยนเป็นไอพีเครื่องเราเช่น 122.155.3.59<br />
RPAFheader X-Forwarded-For</p></blockquote>
<p>สั่ง restart apache</p>
<blockquote><p>[root@demo01 ~]#/etc/init.d/httpd restart</p></blockquote>
<p>เป็นอันเสร็จครับเท่านี้ใน log apache เราก็จะได้ ip ที่ถูกต้อง</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=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/&amp;layout=standard&amp;show_faces=true&amp;width=260&amp;action=like&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><fb:share-button href="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/" type="box_count"></fb:share-button>]]></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>
