I have a problem with Django application under Apache and mod_uwsgi behind Elastic Load Balancer.
Application work fine when accessing by IP or Domain Name, but if i setting ELB in front of it, Django Application stop working, i have only static files(which server by apache) and 502 BAD GATEWAY error in browser and no errors at all on the server, when trying to access Django application.
UWSGI config:
[uwsgi]
socket = /tmp/uwsgi.sock
pidfile = /var/run/uwsgi_timebridge.pid
Httpd Config:
<Location / >
SetHandler uwsgi-handler
uWSGISocket /tmp/uwsgi.sock
</Location>
<Location /static >
SetHandler default-handler
</Location>
<Location /static/admin/ >
SetHandler default-handler
</Location>
<Location /media >
SetHandler default-handler
</Location>
<Location /downloads/ >
SetHandler default-handler
</Location>
<Directory /home/www/sources/my_project/project/static >
Order deny,allow
Allow from All
</Directory>
#The rest directories also declared
Aucun commentaire:
Enregistrer un commentaire