I'm trying to deploy my django project, and everything works EXCEPT static files!!! This problem is driving me mad and I've literally tried every "fix" that I googled, but the problem is not resolved.
First, I followed all the steps in the official wiki https://wiki.bitnami.com/Infrastructure_Stacks/BitNami_Django_Stack . I double-checked.
My project's httpd-app.conf is:
<IfDefine !IS_DJANGOSTACK_LOADED>
Define IS_DJANGOSTACK_LOADED
WSGIDaemonProcess wsgi-djangostack processes=2 threads=15 display-name=%{GROUP}
</IfDefine>
Alias /static "/opt/bitnami/apps/django/django_projects/freightshipment/freightshipment/static"
WSGIScriptAlias /freightshipment '/opt/bitnami/apps/django/django_projects/freightshipment/freightshipment/wsgi.py'
<Directory "/opt/bitnami/apps/django/django_projects/freightshipment/freightshipment/">
WSGIProcessGroup wsgi-djangostack
WSGIApplicationGroup %{GLOBAL}
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
I added the Alias line so whenever my url goes to myproject.com/static, it tries to find the static files in opt/bitnami/apps/django/django_projects/freightshipment/freightshipment/static. Inside my freightshipment/freighshipment/static folder are all the static files I need (collected using collectstatic).
Inside my settings.py for django:
STATIC_ROOT = "/opt/bitnami/apps/django/django_projects/freightshipment/freightshipment/static"
STATIC_URL = '/static/'
So why oh why is it giving me Failed to load resource: the server responded with a status of 403 (Forbidden) for my static files in my error console log of my browser when I go to myproject.com/webpage or myproject.com/admin?
My apache2 error log messages are:
AH01630: client denied by server configuration: /opt/bitnami/apps/django/lib/python2.7/site-packages/django
I am at my wit's end and getting very very frustrated at this. I've tried everything and I can't get it to work. Please help. Thank you.