Skip to content

Instantly share code, notes, and snippets.

@ksafranski
Created June 19, 2013 13:15
Show Gist options
  • Select an option

  • Save ksafranski/5814242 to your computer and use it in GitHub Desktop.

Select an option

Save ksafranski/5814242 to your computer and use it in GitHub Desktop.
Port-based Apache proxy (good for nodejs apps) via VirtualHost
1. Run the following commands:
a2enmod proxy
a2enmod proxy_http
2. Setup a VirtualHost in /etc/apache2/sites-available/
<VirtualHost *:80>
ServerName something.mydomain.com
ProxyPass / http://something.mydomain.com:9999
</VirtualHost>
3. Link it
ln -s something.mydomain.com ../sites-enabled/something.mydomain.com
4. Restart Apache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment