Created
December 7, 2014 05:10
-
-
Save craigpalermo/9a959b8ce605cce84072 to your computer and use it in GitHub Desktop.
Apache proxy for NodeJS server on port 3000
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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