Skip to content

Instantly share code, notes, and snippets.

@pettazz
Last active April 16, 2019 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pettazz/e979cce035c364adf5008faa61a24aac to your computer and use it in GitHub Desktop.
Save pettazz/e979cce035c364adf5008faa61a24aac to your computer and use it in GitHub Desktop.
Reverse SSL proxy apache config
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName osto.us
ServerAlias osto.us
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
AuthType Basic
AuthName "u wot m8?"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
Order deny,allow
Allow from all
</Location>
<Location /ping>
Satisfy Any
Allow from all
</Location>
SSLEngine on
SSLProxyEngine On
RewriteEngine On
SSLCertificateFile /etc/letsencrypt/live/osto.us/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/osto.us/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ProxyRequests Off
ProxyPreserveHost On
# Transmission
ProxyPass /transmission http://127.0.0.1:9091/transmission
ProxyPassReverse /transmission http://127.0.0.1:9091/transmission
#PlexPy
ProxyPass /plexpy http://127.0.0.1:8181/plexpy
ProxyPassReverse /plexpy http://127.0.0.1:8181/plexpy
#Sonarr
ProxyPass /sonarr http://127.0.0.1:8989/sonarr
ProxyPassReverse /sonarr http://127.0.0.1:8989/sonarr
#Radarr
ProxyPass /radarr http://127.0.0.1:7878/radarr
ProxyPassReverse /radarr http://127.0.0.1:7878/radarr
#netdata
ProxyPass /netdata http://127.0.0.1:19999/
ProxyPassReverse /netdata http://127.0.0.1:19999/
RewriteRule ^/netdata$ https://%{HTTP_HOST}/netdata/ [L,R=301]
</VirtualHost>
</IfModule>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment