Skip to content

Instantly share code, notes, and snippets.

@yoggy
Last active February 22, 2023 09:02
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 yoggy/ca6f635ddaeb409ed5a5800ee1749464 to your computer and use it in GitHub Desktop.
Save yoggy/ca6f635ddaeb409ed5a5800ee1749464 to your computer and use it in GitHub Desktop.
Apache2 TLS termination proxy for MinIO
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# TLS termination proxy for MinIO
# for minio test
<Location "/favicon-32x32.png">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/favicon-32x32.png
</Location>
<Location "/Loader.svg">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/Loader.svg
</Location>
<Location "/apple-icon-180x180.png">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/apple-icon-180x180.png
</Location>
<Location "/browser">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/browser
</Location>
<Location "/browser/">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/browser/
</Location>
<Location "/login">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/login
</Location>
<Location "/logout">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/logout
</Location>
<Location "/manifest.json">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/manifest.json
</Location>
<Location "/styles/">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/styles/
</Location>
<Location "/static/">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/static/
</Location>
<Location "/images/">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/images/
</Location>
<Location "/api/">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9001/api/
</Location>
<Location "/ws/">
ProxyPreserveHost On
ProxyPass ws://127.0.0.1:9001/ws/
</Location>
# for bucket
<Location "/test-bucket-1">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9000/test-bucket-1/
</Location>
<Location "/test-bucket-2">
ProxyPreserveHost On
ProxyPass http://127.0.0.1:9000/test-bucket-2/
</Location>
ServerName www.sabamiso.net
SSLCertificateFile /etc/letsencrypt/live/www.sabamiso.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.sabamiso.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment