Configuration django project after bncert-tool

Keywords: General - AWS - How to - Secure Connections (SSL/HTTPS)
I have an Django project deployed on ubuntu AWS instance with Bitnami and configured with Lightsail, Route53.

The project is working for HTTP.

I’ve tried to migrate to HTTPs using the bncert-tool and got DNS with HTTPS, although I see:
“You are now running Bitnami Django 3.1.6 in the Cloud”
instead of my project.
HTTP://<static_ip> is showing my project.

I didn’t enable: sample-vhost.conf and sample-https-vhost.conf, as if I do that I see “You don’t have permission”.

Are there additional steps that should be executed after bncert-tool?

Hi @andrey.masunov,

We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

How to Run the Bitnami Support Tool in a cloud image or virtual machine

Please note that you need to paste the code ID that is shown at the end.


Thank you for your support!
this is the code: 5971d164-c078-1665-b152-dc8d56ef68bf

Hi @andrey.masunov,

It seems system apache is running on your instance. You can run the following command to stop it:

sudo systemctl disable apache2 && sudo systemctl stop apache2 

After that restart Bitnami Apache:

sudo /opt/bitnami/ restart apache


Thank you for your reply. Unfortunately, I’ve got an exception when I am running the above commands:
$$$ sudo systemctl disable apache2
Failed to disable unit: Unit file apache2.service does not exist.
This command is working fine: sudo /opt/bitnami/ restart bitnami, but didn’t resolve the issue

But I’ve decided to start from beginning and create new aws instance.
Before bncert tool: HTTP://<www.domain> is working fine
After bncert tool HTTPs://<www.domain> shows me the default apache page as previously

I did changes in 2 files:

  1. /opt/bitnami/apache/conf/httpd.conf
    DocumentRoot “/opt/bitnami/projects/referralfirst”
    <Directory “/opt/bitnami/projects/referralfirst”>
    ServerName (previously it was :80, but result was the same)

  2. /opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf
    DocumentRoot “/opt/bitnami/projects/referralfirst”
    <Directory “/opt/bitnami/projects/referralfirst”>

After the above changes, I see on a list of files of my project instead of the app itself.

path to my project:

and the list of files inside:
drwxrwxrwx 9 bitnami bitnami 4096 Apr 26 00:04 .
drwxrwxrwx 3 root root 4096 Apr 25 02:12 …
drwxrwxrwx 2 bitnami bitnami 4096 Apr 26 00:08 conf
-rwxrwxrwx 1 bitnami bitnami 135168 Mar 30 23:40 db.sqlite3
-rwxrwxrwx 1 bitnami bitnami 6148 Mar 27 00:06 .DS_Store
drwxrwxrwx 4 bitnami bitnami 4096 Mar 15 00:08 env
drwxrwxrwx 3 bitnami bitnami 4096 Apr 11 01:35 .idea
-rwxrwxrwx 1 bitnami bitnami 669 Mar 15 00:06
drwxrwxrwx 4 bitnami bitnami 4096 Mar 30 23:28 referralapp
drwxrwxrwx 3 bitnami bitnami 4096 May 6 23:10 referralfirst
drwxrwxrwx 3 bitnami bitnami 4096 Apr 27 00:37 static
drwxrwxrwx 3 bitnami bitnami 4096 Mar 23 23:35 templates

This is a new code for investigation:

Could you tell me please, what should be changed to see the project itself instead of the list of files?

one additional point:
The command: sudo /opt/bitnami/ restart bitnami also isn’t working
Failed to restart bitnami: Cannot find check with id bitnami

Hi @andrey.masunov,

Can you check if you followed all the steps from this guide for deploying a django project?

Sorry, my bad, it should be:

sudo /opt/bitnami/ restart apache