Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Just a simple Example Proxy pass template for apache
#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>
@torch2424
Copy link
Author

torch2424 commented Oct 5, 2016

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

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