http to https redirection
<VirtualHost *:80>
ServerName abc.com
RewriteEngine on
SSLEngine on
Redirect / https://abc.com
</VirtualHost>
Redirection https url https://www.abc.com to https://abc.com
<VirtualHost *:443>
ServerName www.abc.com
RewriteEngine on
SSLEngine on
Redirect / https://abc.com
SSLCertificateFile /etc/letsencrypt/live/abc.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/abc.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
<VirtualHost *:80>
ServerName abc.com
RewriteEngine on
SSLEngine on
Redirect / https://abc.com
</VirtualHost>
Redirection https url https://www.abc.com to https://abc.com
<VirtualHost *:443>
ServerName www.abc.com
RewriteEngine on
SSLEngine on
Redirect / https://abc.com
SSLCertificateFile /etc/letsencrypt/live/abc.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/abc.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
0 comments:
Post a Comment