Skip to content

Instantly share code, notes, and snippets.

@MaZderMind
Created July 16, 2017 14:19
Show Gist options
  • Save MaZderMind/b95da0071ba6d4dcbf7babfeb477a292 to your computer and use it in GitHub Desktop.
Save MaZderMind/b95da0071ba6d4dcbf7babfeb477a292 to your computer and use it in GitHub Desktop.
Apache Configuration forwarding all unknown Requests to the Kubernetes-Cluster's Ingress
<VirtualHost *:80>
ServerAdmin peter@mazdermind.de
ServerName cluster-forward.mazdermind.de
# ServerAlias *
ProxyPass / "http://127.0.0.1:32080/" retry=0
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
<VirtualHost *:443>
ServerAdmin peter@mazdermind.de
ServerName cluster-forward.mazdermind.de
# ServerAlias *
SSLEngine on
SSLCertificateFile /var/lib/acme/live/mazdermind.de/fullchain
SSLCertificateKeyFile /var/lib/acme/live/mazdermind.de/privkey
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains
ProxyPreserveHost On
ProxyPass / "http://127.0.0.1:32080/" retry=0
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment