Skip to content

Instantly share code, notes, and snippets.

@mikatalk
Created November 30, 2017 05:12
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 mikatalk/99c28615109eb56622eeb7f50d5babdc to your computer and use it in GitHub Desktop.
Save mikatalk/99c28615109eb56622eeb7f50d5babdc to your computer and use it in GitHub Desktop.
Apache proxy pass to local node server
```
# /etc/hosts
127.0.0.1 node.server.local
```
```
# httpd.conf
LoadModule proxy_module libexec/mod_proxy.so
LoadModule proxy_http_module libexec/mod_proxy_http.so
```
```
# httpd-ssl.conf
<VirtualHost *:443>
ServerName node.server.local
ServerAlias node.server.local
ProxyPass / https://0.0.0.0:1234/
ProxyPassReverse / https://0.0.0.0:1234/
SSLEngine On
SSLProxyEngine On
ProxyRequests Off
SSLProxyCheckPeerCN off
SSLProxyCheckPeerExpire off
SSLInsecureRenegotiation on
SSLProxyVerify none
SSLVerifyClient none
SSLCertificateFile CERT_PATH_HERE.crt
SSLCertificateKeyFile KEY_PATH_HERE.key
<Location "/">
Require all granted
</Location>
</VirtualHost>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment