I wish did fix the issue. First your questions: No, it's one of the options, but it's definitely a good idea to use a centralised, shared storage, for when you'll need to serve your site from multiple EC2 instances. S3 is one option, I use EFS which I find easier (see below). Yes, you need to tell collectstatic where to find the static files so you should have STATICFILES_DIRS. Yes, I like whitenoise, it works well in combination with a CDN. Makes it easier not to worry about expiry/cache headers.
like below fixes the issue I was just reading another tutorial link and I found out that STATIC_URL can be something like this: STATIC_URL = 'http://static.example.com/' So I guess the solution is this one?
Location of settings file for deploying static files with Django on Apache2 with mod_wsgi
I hope this helps you . You don't change any code, because it's not your code that serves static files. You need to configure your web server to do it; which is fine, because you're configuring your web server anyway for deployment. The whole point of the staticfiles app in Django is just that, that it manages files for you in development and puts them in a single place for deployment so you can point your web server at them.
this one helps. My django application is working well on Ubuntu 14.04 / nginx 1.10 / django 1.10.2 / uwsgi 2.0.14, it can also load static files (js, css, images) as well, but css files is not apply to my website. The following is my configuration. , As per discussion Middleware class was missing, setting.py
Does that help There is definitive guide about deploying a django app to AWS Elastic Beanstalk from RealPython - here it is. It has whole section about static files and how to configure it with eb and you don't need to know anything about nginx/apache etc. Basically you should define container_commands in your eb config, these commands will be executed after application deploy is finished. For example migrate and collectstatic, so this is an example of such section in eb config file: