<?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>Linux Admin Zone &#187; mod_proxy</title>
	<atom:link href="http://linuxadminzone.com/tag/mod_proxy/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxadminzone.com</link>
	<description>Adding more reasons to celebrate Open Source.</description>
	<lastBuildDate>Wed, 09 May 2012 10:17:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Apache url rewriting with masking</title>
		<link>http://linuxadminzone.com/apache-url-rewriting-with-masking/</link>
		<comments>http://linuxadminzone.com/apache-url-rewriting-with-masking/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 10:57:13 +0000</pubDate>
		<dc:creator>jagbir</dc:creator>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mod_proxy]]></category>
		<category><![CDATA[url proxy]]></category>
		<category><![CDATA[url rewrite]]></category>

		<guid isPermaLink="false">http://linuxadminzone.com/?p=125</guid>
		<description><![CDATA[I got an assignment where I&#8217;ve to move some apps from a server (due to immense load) to different server without changing URLs. Main software app should remains in first server and all other smaller apps should be moved to another server but because all apps are integrated (for seamless login etc) with each other, [...]]]></description>
			<content:encoded><![CDATA[<p>I got an assignment where I&#8217;ve to move some apps from a server (due to immense load) to different server without changing URLs. Main software app should remains in first server and all other smaller apps should be moved to another server but because all apps are integrated (for seamless login etc) with each other, URL on the browser should not change when browing the main app or any of its subordinate apps residing on different server.</p>
<p>The quick solution is to update httpd.conf in your main server to redirect traffic for certain apps to different server (or domain). Apache will work like a proxy when accessing other apps. for example, here are sample URLs:</p>
<p>Main Application: http://www.maindomain.com/<br />
Pages of main application: http://www.maindomain.com/something.html<br />
Other application 1: http://www.maindomain.com/wiki/<br />
Other application 2: http://www.maindomain.com/forums/</p>
<p>Here&#8217;s what I&#8217;ve used, open httpd.conf and add following lines in it: </p>
<blockquote><p>RewriteEngine on<br />
RewriteRule ^/wiki/(.*) http://otherdomain.com/wiki/$1 [P,L]<br />
RewriteRule ^/forums/(.*) http://otherdomain.com/forums/$1 [P,L]</p>
<p>ProxyPassReverse / http://otherdomain.com/</p></blockquote>
<p>Details:<br />
Pls make sure that mod_proxy and mod_rewrite are loaded in apache. In above lines: </p>
<p>line 1: Turns on rewrite engine provided by mod_rewrite<br />
line 2 and 3: A rewrite rule to parse the url and detect the word (wiki) in begining of it. if word is there, then rewrite url using different domains (or IP address). The last parameter [P] indicates that its a proxy request.</p>
<p>line 4: URL that needs to be masked while browsing. </p>
<p>Save file, restart/reload httpd service and check. It worked in my case but your requirement may be different, I recommend having of a look of <a href="httpd.apache.org/docs/2.0/misc/rewriteguide.html">official documentation</a> for url rewriting.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxadminzone.com/apache-url-rewriting-with-masking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

