Report this

What is the reason for this report?

http > https redirect

Posted on June 9, 2020

Hello, I set up a new droplet with the wordpress default, I also enabled ssl with the certbot, i asked for the cert bot to configure a forward of http to https, but it didn’t work for me. I’ve tried adding the permanent redirect line in the config file, but it doesn’t seem to have taken it up? Location: /etc/apache2/sites-enabled/000-default.conf here’s my config:

UseCanonicalName On

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        ServerName 40acresproject.com
        ServerAlias www.40acresproject.com
        Redirect permanent / https://40acresproject.com/

        DocumentRoot /var/www/html

        <Directory /var/www/html/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        DocumentRoot /var/www/html

        <Directory /var/www/html/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =40acresproject.com [OR]
RewriteCond %{SERVER_NAME} =www.40acresproject.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

Thanks in advance for your help!

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.