I installed WordPress and let’s encrypt following the quick start guide, however, immediately after setting it up fully the website stops loading.
Let’s Encrypt was set to redirect to https, and there were no errors on the configuration.
Checked https://check-your-website.server-daten.de/?q=todologistics.com and got this:
Wrong redirect one domain http to other domain https. First redirect to https without new dns query, so the server can send the HSTS header. That's fundamental using HSTS (Http Strict Transport Security). First step: Add correct redirects http ⇒ https. Perhaps in your port 80 vHost something like "RewriteEngine on" + "RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]" (two rows, without the "). Don't add this in your port 443 vHost, that would create a loop. Then recheck your domain, should be Grade C. There is the rule to select one https version as preferred version.
However, apache 2 configs look fine:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName todologistics.com
ServerAlias www.todologistics.com
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
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/www.todologistics.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.todologistics.com/privkey.pem
</VirtualHost>
</IfModule>
# Added to mitigate CVE-2017-8295 vulnerability
UseCanonicalName On
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName todologistics.com
ServerAlias www.todologistics.com
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} =www.todologistics.com [OR]
RewriteCond %{SERVER_NAME} =todologistics.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @evargasw,
Everything seems correct in your VirtualHost file, however it’s possible you haven’t allowed connections on port 443.
If you are using UFW, you can list all application profiles available on your server by typing:
sudo ufw app list
Depending on the packages installed on your system the output will look similar to the following:
Available applications:
Apache Full
Apache HTTP
Apache HTTPS
OpenSSH
Postfix
Postfix SMTPS
Postfix Submission
HTTPS connections can be allowed with the following command:
sudo ufw allow https
To achieve the same instead of https profile you can use the port number, 443:
sudo ufw allow 443/tcp
If you are using Iptables, you can use the following command to allow incoming connections to port 443
sudo iptables -A INPUT -p tcp --dport 443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 443 -m conntrack --ctstate ESTABLISHED -j ACCEPT
Regards, KDSys
This is the first time I have met this case, however, following my experience, I often contact the sellers for more supports. They are normally welcome to solve this via teamviewer.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.