DZone 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
Apache2 Proxy To Local Port
Apache as the receptionist, forwarding requests to and from an internal server (e.g. webrick or lighttpd).
<VirtualHost *> ServerName www.example.com ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ ProxyPreserveHost On </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.