Created
October 5, 2016 19:18
-
-
Save torch2424/1c753eee361d89981851429ce6e01806 to your computer and use it in GitHub Desktop.
Just a simple Example Proxy pass template for apache
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
#Nice little guide | |
# http://blog.podrezo.com/making-node-js-work-with-apache/ | |
<VirtualHost *:80> | |
# Reverse proxy from gogs github issue: https://github.com/gogits/gogs/issues/806 | |
# | |
ProxyPreserveHost On | |
ProxyRequests off | |
ProxyPass / http://localhost:PORT/ | |
ProxyPassReverse / http://localhost:PORT/ | |
ServerName SUBDOMAIN.DOMAIN.com | |
ServerAlias SUBDOMAIN | |
RewriteEngine on | |
RewriteCond %{SERVER_NAME} =SUBDOMAIN.DOMAIN.com [OR] | |
RewriteCond %{SERVER_NAME} =SUBDOMAIN | |
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] | |
</VirtualHost> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, make sure to host the node server locally over http.
http://stackoverflow.com/questions/22375975/502-proxy-error-in-express-js-while-integrating-with-apache
Apache will handle the TLS encryption