Http to https redirect does not work

My domain is:

My web server is (include version):

The operating system my web server runs on is (include version):
Ubuntu 19.10

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):
certbot 1.3.0

======================================= works does not work

.conf file is below

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

RewriteEngine on
#RewriteCond %{SERVER_NAME} [OR]
RewriteCond %{SERVER_NAME}
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]


DocumentRoot /var/www/html
<Directory />
    Require all denied
Alias /.well-known/acme-challenge /var/www/acme
<Directory /var/www/acme>
    Options None
    AllowOverride None
    Require all granted
<Directory /var/www/html>
    Redirect permanent /

Run this command and tell me if tells you something like “Listen 80” somewhere:

grep -ir "Listen" /etc/apache2

Also check your firewall on port 80.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.