Https: lauches the root web folder rather than the subdomain folder

I used Letsencrypt to set up https support with the command:

./letsencrypt-auto certonly -w /home/bitnami/htdocs/football -d

What I am trying to do is to apply the certificate such that is valid. But now when I go to it is still find but launches into the web pages in my root /home/bitnami/htdocs folder, not the football subdomain folder! I must have done something wrong for setting up a subdomain for HTTPS support but I’m stumped. Thanks for any help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version): Apacke

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

My hosting provider, if applicable, is: Amazon Lightsail

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


Please take a look at Bitnami’s official forum…

Thank you

Unfortunately the links in the article you pointed me to did not work any more. The specific bookmarks are gone.

I was able to get it working pretty well by going into the apache2/conf/extras/httpd-vhost.conf file and, in addition to the existing entry looking on port 80 for the standard http: requests I added the following with the 443 port and with links to the certificates:

<VirtualHost *:443>
DocumentRoot “/opt/bitnami/apache2/htdocs/football”
SSLEngine on
SSLCertificateFile “/etc/letsencrypt/live/”
SSLCertificateKeyFile “/etc/letsencrypt/live/”

The only thing I have left would be to re-route folks who enter the HTTP address over to the HTTPS site. Not 100% sure how to do that but it is not as critical. Thanks for taking the time to try to help!

Hi @bkitto

find your vHost port 80. Add there something like

<VirtualHost *:80> 

	[other declarations]

	RewriteEngine On
	RewriteCond %{HTTPS} !=on
	RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]


You should use fullchain.pem instead of cert.pem.

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