Https not working after certbot install success

anyone can help me? i successfully installed certbot but https is not working.

My domain is: adventist-pic.org

I ran this command: certbot --apache

It produced this output:

My web server is (include version): apache2

The operating system my web server runs on is (include version): ubuntu server 20.04

My hosting provider, if applicable, is:

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

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

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

Hi @jvvalenzuela

you have a certificate only with the main domain name, but a redirect https + non-www -> https + www.

So your www version hasn't the correct certificate.

Create one certificate with both domain names.

What says

apachectl -S

Looks like a missing ServerAlias of your www version.

here is what it says after apachectl -s
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.10.16. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:443 adventist-pic.org (/etc/apache2/sites-enabled/auppic-le-ssl.conf:2)
*:80 adventist-pic.org (/etc/apache2/sites-enabled/auppic.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
i am new at this can you help me out on what to do on this matter?

Can you edit the file /etc/apache2/sites-enabled/auppic.conf and add a line

ServerAlias www.advertist-pic.org

inside of the VirtualHost block?

You can see some examples of what this is supposed to look like in various configurations at

https://httpd.apache.org/docs/2.4/vhosts/examples.html

If that works, then re-running certbot --apache should offer you both names (adventist-pic.org and www.adventist-pic.org), and you can choose both of them to get a single certificate covering both.

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