I'm currently trying to learn Django, however, I can't get Apache to serve the static files. I've tried using the development server or gunicorn both running on port 8000.
I can access the page just fine, but Bootstrap is not loaded. Also, when I'm trying to open the static files directly (mydomain.com:8000/static/app/css/bootstrap.min.css) I get a "Connection Refused".
<VirtualHost *:8000>
DocumentRoot /home/django/project/
ServerName mydomain.com
Alias /static /home/django/project/static
<Directory /home/django/project/static>
Require all granted
</Directory>
root@ip-:~# tree -dc /home/django/project/
/home/django/project/
|-- app
| |-- templates
| | `-- app
| | `-- includes
| |-- __pycache__
| |-- static
| | `-- app
| | `-- bootstrap-3.3.6-dist
| | |-- css
| | |-- fonts
| | `-- js
| `-- migrations
| `-- __pycache__
|-- static
| |-- admin
| | |-- css
| | |-- fonts
| | |-- img
| | | `-- gis
| | `-- js
| | |-- admin
| | `-- vendor
| | |-- jquery
| | `-- xregexp
| |-- bootstrap-3.3.6-dist
| | |-- css
| | |-- fonts
| | `-- js
| `-- app
| |-- bootstrap-3.3.6-dist
| | |-- css
| | |-- fonts
| | `-- js
| |-- css
| |-- fonts
| `-- js
`-- project
`-- __pycache__
From settings.py:
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static/")
STATICFILES_DIRS = (os.path.join(os.path.dirname(__file__),'static'),)