Skip to content

Instantly share code, notes, and snippets.

@pioz
Last active September 18, 2020 23:52
Show Gist options
  • Select an option

  • Save pioz/f77f1a132f273a7d2ec7a24b23c947d1 to your computer and use it in GitHub Desktop.

Select an option

Save pioz/f77f1a132f273a7d2ec7a24b23c947d1 to your computer and use it in GitHub Desktop.
Apache Proxy Pass sample config file
<VirtualHost *:80>
ServerName example.com
Redirect permanent / https://example.com/
ErrorLog /var/log/apache2/example-error.log
CustomLog /var/log/apache2/example-access.log combined
ServerSignature Off
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
DocumentRoot /home/pioz/example/frontend/current/public
ProxyRequests off
ProxyPreserveHost on
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
# Do not proxy public/images dir
<Location /images/ >
Require all granted
ProxyPass !
</Location>
SSLEngine On
SSLCertificateFile /home/pioz/example/certs/fullchain1.pem
SSLCertificateKeyFile /home/pioz/example/certs/privkey1.pem
ErrorLog /var/log/apache2/example-error.log
CustomLog /var/log/apache2/example-access.log combined
ServerSignature Off
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment