Difference between revisions of "Apache ProxyPass v RewriteRule"

From MyWiki
Jump to: navigation, search
(Created page with "< source lang="text"> I just did this a week ago and it turned out to be really easy. There are two ways to do it in your httpd.conf file ... <VirtualHost *:80> ServerName...")
(No difference)

Revision as of 19:56, 4 May 2015

< source lang="text">

I just did this a week ago and it turned out to be really easy. There are two ways to do it in your httpd.conf file ...

<VirtualHost *:80> ServerName www.your-domain.com ProxyPreserveHost on ProxyPass /cp http://localhost:5678/cp ProxyPass /db/ http://localhost:5984/ </VirtualHost>

... or ...

<VirtualHost *:80> ServerName www.your-domain.com RewriteRule ^/(cp|db/|static/|www/)(.*)$ http://localhost:5678/$1$2 [P] <VirtualHost>

Google ProxyPass or RewriteRule for details.


</source>