Skip to content

Instantly share code, notes, and snippets.

@torch2424
Created October 5, 2016 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torch2424/1c753eee361d89981851429ce6e01806 to your computer and use it in GitHub Desktop.
Save torch2424/1c753eee361d89981851429ce6e01806 to your computer and use it in GitHub Desktop.
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

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