Last active
December 2, 2018 15:33
-
-
Save Marwe/53f9390741b603919efc3a5a6eb419b2 to your computer and use it in GitHub Desktop.
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
# forward browser to a myfritz address with rewrite | |
# adapt home.domain.tld, YOURHASH and port 12345 to your values | |
<VirtualHost *:80> | |
ServerName home.domain.tld | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/none/ | |
ErrorLog /error.log | |
CustomLog /access.log combined | |
RewriteEngine on | |
RewriteCond %{SERVER_NAME} =home.domain.tld | |
RewriteRule ^ https://YOURHASH.myfritz.net:12345/%{REQUEST_URI} [END,NE | |
,R=permanent] | |
</VirtualHost> | |
<IfModule mod_ssl.c> | |
<VirtualHost *:443> | |
ServerName home.domain.tld | |
ServerAdmin webmaster@localhost | |
RewriteEngine on | |
RewriteCond %{SERVER_NAME} =home.domain.tld | |
RewriteRule ^ https://YOURHASH.myfritz.net:12345/%{REQUEST_URI} [END,NE,R=permanent] | |
ErrorLog /error.log | |
CustomLog /access.log combined | |
SSLEngine on | |
BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 | |
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown | |
# your cert may be in a different place | |
Include /etc/letsencrypt/options-ssl-apache.conf | |
SSLCertificateFile /etc/letsencrypt/live/home.domain.tld/cert.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/home.domain.tld/privkey.pem | |
SSLCertificateChainFile /etc/letsencrypt/live/home.domain.tld/chain.pem | |
</VirtualHost> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment