Created
January 20, 2023 23:37
-
-
Save d70rr3s/f1e6944f4b400116000ddee09ede85f5 to your computer and use it in GitHub Desktop.
apache reverse proxy for docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Making temporary redirect from http to https | |
<VirtualHost *:80> | |
ServerName example.com | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{SERVER_NAME}/ [R=307,L] | |
</VirtualHost> | |
# Reverse proxy for gitlab container | |
<VirtualHost *:443> | |
ServerName example.com | |
ErrorLog /var/www/example/production/storage/log/apache.host.error.log | |
CustomLog /var/www/example/production/storage/log/apache.host.custom.log combined | |
SSLEngine on | |
SSLProxyEngine on | |
SSLProtocol all -SSLv2 -SSLv3 | |
SSLCertificateFile /etc/ssl/private/servercerts/example_com.crt | |
SSLCertificateKeyFile /etc/ssl/private/servercerts/example_comprivate.nopass.key | |
SSLCertificateChainFile /etc/ssl/private/servercerts/example_com.ca-bundle | |
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS | |
ProxyRequests Off | |
ProxyPreserveHost On | |
ProxyPass / https://example.com:10443/ | |
ProxyPassReverse / https://example.com:10443/ | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment