Question
https is redirecting to http , how can I do the reverse ?
Hi, I have installed https with letsencrypt, but the https url is redirecting to http
how can I fix it ?
I have both .conf files, and .htaccess
ssl.conf:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName xxxxx.com
ServerAlias www.xxxx.com
DocumentRoot /var/www/xxxx.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/xxxx.com/public_html">
AllowOverride All
Options Indexes FollowSymLinks MultiViews
</Directory>
SSLCertificateFile /etc/letsencrypt/live/xxxx.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxxx.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/xxxx.com/chain.pem
</VirtualHost>
</IfModule>
nossl.conf:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName xxxx.com
ServerAlias www.xxxx.com
DocumentRoot /var/www/xxxx.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/xxxx.com/public_html">
AllowOverride All
Options Indexes FollowSymLinks MultiViews
</Directory>
</VirtualHost>
.htaccess of my site:
<IfModule mod_rewrite.c>
#Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×