Report this

What is the reason for this report?

https is redirecting to http , how can I do the reverse ?

Posted on August 31, 2016

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>

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.