Can't load static file in Django stack

Type: Bitnami Support Tool

Description:
Bitnami Support Tool ID : af4c0fbf-7a52-2520-0832-1b2b7e8b48e2

I follow the guide https://docs.bitnami.com/aws/infrastructure/django/get-started/deploy-django-project/ but in vain.

Method 1 :
Create and edit the /opt/bitnami/apache2/conf/vhosts/myapp-http-vhost.conf file and add the following lines:
but /opt/bitnami/apache/ exisit, /opt/bitnami/apache2/ dose not exist.

I tried make

/opt/bitnami/apache2/conf/vhosts/myapp-http-vhost.conf

and

/opt/bitnami/apache2/conf/vhosts/myapp-https-vhost.conf

but it does not work

Method 2:
import os
import sys
sys.path.append(’/opt/bitnami/apps/django/django_projects/PROJECT’)
os.environ.setdefault(“PYTHON_EGG_CACHE”, “/opt/bitnami/apps/django/django_projects/myproject/egg_cache”)
os.environ.setdefault(“DJANGO_SETTINGS_MODULE”, “PROJECT.settings”)
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

in the previous edition, /opt/bitnami/apps/django/django_projects/PROJECT is true.
but in 3.19 django stack, it changed to/opt/bitnami/projects/PROJECT

Besides, /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf does not exist.

I’ve tried both ways, they all failed and I can’t get the static file.

How can I make correct Apache and django setting to get static file? Thanks for your help.

Hi @hfh2018,

This is not a “Bitnami Support Tool” related question, but a technical issue with the instance. That category is only for issues with the tool itself. Please create a new ticket in the forum using the “Technical issue” category so you review all the information the wizard provides when evaluating the information.

Thanks

1 Like