SHARE
TWEET

nginx 8082

a guest Oct 27th, 2015 130 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #upstream app_server {
  2. #    server 127.0.0.1:9500 fail_timeout=0;
  3. #}
  4.  
  5. upstream app_server {
  6.         server 127.0.0.1:8082 fail_timeout=0;
  7.        
  8. }
  9.  
  10. server {
  11.     listen 8000;
  12.     listen [::]:8000 default_server ipv6only=on;
  13.  
  14.     root /home/django/discotecas;
  15.     index /discotecas/wsgi.py;
  16.  
  17.     access_log /home/django/logs/access.log;   
  18.    
  19.     client_max_body_size 4G;
  20.     server_name www.eventosenlaciudad.example.com;
  21.  
  22.     keepalive_timeout 5;
  23.  
  24.     # Your Django project's media files - amend as required
  25.     #location /media  {
  26.     #    alias /home/django/django_project/django_project/media;
  27.     #}
  28.  
  29.     # your Django project's static files - amend as required
  30.     location /static/ {
  31.         #autoindex on;
  32.         #alias /home/django/discotecas/static/;
  33.         root /home/django/discotecas/;
  34.     }
  35.  
  36.     # Proxy the static assests for the Django Admin panel
  37.     location /static/admin {
  38.        alias /usr/lib/python2.7/dist-packages/django/contrib/admin/static/admin/;
  39.     }
  40.  
  41.     location / {
  42.         add_header Access-Control-Allow-Origin *;
  43.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  44.         proxy_set_header Host $http_host;
  45.         proxy_redirect off;
  46.         proxy_pass http://app_server; #http://127.0.0.1:8001;
  47.     }
  48. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top