Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

http://www.42zen.com/

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Apache2 proxy to local port

Apache as the receptionist, forwarding requests to and from an internal server (e.g. webrick or lighttpd).

   1  
   2  <VirtualHost *>
   3          ServerName www.example.com
   4          ProxyPass / http://localhost:3000/
   5          ProxyPassReverse / http://localhost:3000/
   6          ProxyPreserveHost On
   7  </VirtualHost>


Change 3000 to whatever port you need and make sure the internal server is set up to answer requests on that port (not port 80). The ProxyPreserveHost line is critical to keep all your URLs working correctly.
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS