Skip to content

Instantly share code, notes, and snippets.

@NthPortal
Last active June 15, 2021 19:35
Show Gist options
  • Save NthPortal/beef6c67b696b63300926c146a5556ae to your computer and use it in GitHub Desktop.
Save NthPortal/beef6c67b696b63300926c146a5556ae to your computer and use it in GitHub Desktop.
Example proxy config (for Sonatype Nexus) for Apache2
ProxyRequests Off
ProxyPreserveHost On
<VirtualHost *:80>
ServerName example.com
RedirectPermanent / https://example.com/
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
ServerName example.com
ProxyPass / http://localhost:8081/
ProxyPassReverse / http:/localhost:8081/
RequestHeader set X-Forwarded-Proto "https"
ErrorLog logs/example.com/nexus/error.log
CustomLog logs/example.com/nexus/access.log common
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment