Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #upstream app_server {
- # server 127.0.0.1:9500 fail_timeout=0;
- #}
- upstream app_server {
- server 127.0.0.1:8082 fail_timeout=0;
- }
- server {
- listen 8000;
- listen [::]:8000 default_server ipv6only=on;
- root /home/django/discotecas;
- index /discotecas/wsgi.py;
- access_log /home/django/logs/access.log;
- client_max_body_size 4G;
- server_name www.eventosenlaciudad.example.com;
- keepalive_timeout 5;
- # Your Django project's media files - amend as required
- #location /media {
- # alias /home/django/django_project/django_project/media;
- #}
- # your Django project's static files - amend as required
- location /static/ {
- #autoindex on;
- #alias /home/django/discotecas/static/;
- root /home/django/discotecas/;
- }
- # Proxy the static assests for the Django Admin panel
- location /static/admin {
- alias /usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin/;
- }
- location / {
- add_header Access-Control-Allow-Origin *;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $http_host;
- proxy_redirect off;
- proxy_pass http://app_server; #http://127.0.0.1:8001;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement