Skip to content

Instantly share code, notes, and snippets.

@craigpalermo
Created December 7, 2014 05:10
Show Gist options
  • Save craigpalermo/9a959b8ce605cce84072 to your computer and use it in GitHub Desktop.
Save craigpalermo/9a959b8ce605cce84072 to your computer and use it in GitHub Desktop.
Apache proxy for NodeJS server on port 3000
<VirtualHost *:80>
ServerName myserver.com
ServerAlias www.myserver.com
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass http://localhost:3000/
ProxyPassReverse http://localhost:3000/
</Location>
DocumentRoot /path/to/static/files/
</VirtualHost>
@anothermouse
Copy link

anothermouse commented Feb 16, 2023

Thankyou for providing this. A couple of notes are given below.

Line 5 needs to be:
ProxyRequests Off
(with a capital O)

...and the correct modules enabled. For Ubuntu 22.0.01 LTS (jammy) you need to have carried out the following as well:

sudo a2enmod proxy
sudo a2enmod proxy_http

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment