Django Internal Server Error

Keywords: Django - AWS - Technical issue - Permissions
Description:
hi! I’m trying to deploy a Django projects on AWS Lightsail. After uploading the data and conf apache2 ( vhost-file-conf) , now I visualize a nice "Internal Server Error "
why? here my "macelleria-https-vhost.conf : <IfDefine !IS_macelleria_sito1_LOADED> Define IS_macelleria_sito1_LOADED WSGIDaemonProcess macelleria_sito1 python-path=/opt/bitnami/apache/htdocs/projects/macelleria_env/lib/python3.8/site-packages processes=2 threads=15 <VirtualHost *:443 default:443> ServerName macellerialfredo.com ServerAlias * SSLEngine on SSLCertificateFile “/etc/letsencrypt/live/macellerialfredo.com/fullchain.pem” SSLCertificateKeyFile “/etc/letsencrypt/live/macellerialfredo.com/privkey.pem” WSGIProcessGroup macelleria_sito1 Alias /robots.txt /opt/bitnami/projects/macelleria_sito1/macelleria_progetto/static/robots.txt Alias /favicon.ico /opt/bitnami/projects/macelleria_sito1/macelleria_progetto/static/favicon.ico Alias /static/ /opt/bitnami/projects/macelleria_sito1/macelleria_progetto/static/ <Directory /opt/bitnami/projects/macelleria_sito1/macelleria_progetto/static> Require all granted Alias /media/ /opt/bitnami/projects/macelleria_sito1/media/ <Directory /opt/bitnami/projects/macelleria_sito1/media> Require all granted WSGIScriptAlias / /opt/bitnami/projects/macelleria_sito1/macelleria_progetto/macelleria_progetto/wsgi.py <Directory /opt/bitnami/projects/macelleria_sito1/macelleria_progetto/macelleria_progetto> Require all granted

…and here the ‘error_log’:

[Sun Apr 11 14:58:48.588239 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “/opt/bitnami/projects/macelleria_sito1/macelleria_progetto/macelleria_progetto/wsgi.py”, line 16, $
[Sun Apr 11 14:58:48.588247 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] application = get_wsgi_application()
[Sun Apr 11 14:58:48.588257 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File "/opt/bitnami/apache/htdocs/projects/macelleria_env/lib/python3.8/site-packages/django/core/wsgi.py$
[Sun Apr 11 14:58:48.588263 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] django.setup(set_prefix=False)
[Sun Apr 11 14:58:48.588272 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “/opt/bitnami/apache/htdocs/projects/macelleria_env/lib/python3.8/site-packages/django/init.py”$
[Sun Apr 11 14:58:48.588278 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Sun Apr 11 14:58:48.588287 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File "/opt/bitnami/apache/htdocs/projects/macelleria_env/lib/python3.8/site-packages/django/conf/_init$
[Sun Apr 11 14:58:48.588293 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] self._setup(name)
[Sun Apr 11 14:58:48.588301 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File "/opt/bitnami/apache/htdocs/projects/macelleria_env/lib/python3.8/site-packages/django/conf/_init$
[Sun Apr 11 14:58:48.588317 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] self._wrapped = Settings(settings_module)
[Sun Apr 11 14:58:48.588326 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File "/opt/bitnami/apache/htdocs/projects/macelleria_env/lib/python3.8/site-packages/django/conf/_init$
[Sun Apr 11 14:58:48.588332 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] mod = importlib.import_module(self.SETTINGS_MODULE)
[Sun Apr 11 14:58:48.588340 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “/opt/bitnami/python/lib/python3.8/importlib/init.py”, line 127, in import_module
[Sun Apr 11 14:58:48.588345 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] return _bootstrap._gcd_import(name[level:], package, level)
[Sun Apr 11 14:58:48.588354 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “”, line 1014, in _gcd_import
[Sun Apr 11 14:58:48.588362 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “”, line 991, in _find_and_load
[Sun Apr 11 14:58:48.588371 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “”, line 961, in _find_and_load_unlocked
[Sun Apr 11 14:58:48.588380 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “”, line 219, in _call_with_frames_removed
[Sun Apr 11 14:58:48.588389 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “”, line 1014, in _gcd_import
[Sun Apr 11 14:58:48.588397 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “”, line 991, in _find_and_load
[Sun Apr 11 14:58:48.588406 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] File “”, line 973, in _find_and_load_unlocked
[Sun Apr 11 14:58:48.588426 2021] [wsgi:error] [pid 31322] [remote 79.52.250.157:57284] ModuleNotFoundError: No module named ‘macelleria_progetto’

Hi @bevilacqua01,

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.

Regards,
Michiel

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