The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 09-14-2003
andyj andyj is offline
Registered User
  
 

Join Date: Jul 2003
Location: UK
Posts: 27
proxy used example

I spotted this today.... a combination of rewite and proxy to use another machine stuck on a local port as a backend server. Hope this adds more light.



Code:
<virtual host 192.168.0.3>
servername www.frontend.com
RewriteEngine On
RewriteOptions 'inherit'
RewriteRule ^/(.*)$ http://192.168.0.4:8001/$1 [proxy]
</virtual host>

will send requests to the backend on port 8001
backend config looks like:


Code:
Listen 8001
<virtual host 192.168.0.4:8001>
DocumentRoot .........
......
</virtual host>


I typed that out from O'Reilly's Apache (the horse book) B&P. Laurie. ISBN 0-596-00203-3