Sult

localhost toevoegen?

Apr 21st, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.87 KB | None | 0 0
  1.  
  2. upstream gunicorn {
  3.     server 127.0.0.1:8000;
  4. }
  5.  
  6. # define an nginx server at port 80
  7. server {
  8.     # listen on port 80
  9.     listen 80;
  10.  
  11.     # keep logs in these files
  12.     access_log /var/log/nginx/evehub_access.log;
  13.     error_log /var/log/nginx/evehub_error.log;
  14.  
  15.     client_max_body_size 0;
  16.  
  17.     # define rules for gunicorn
  18.     location /{
  19.         client_max_body_size 0;
  20.         proxy_pass http://gunicorn;
  21.         proxy_redirect off;
  22.         proxy_read_timeout 5m;
  23.  
  24.         # make sure these HTTP headers are set properly
  25.         proxy_set_header Host            $host;
  26.         proxy_set_header X-Real-IP       $remote_addr;
  27.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  28.     }
  29.  
  30.     location /static {
  31.         alias /home/sult/evehub/static_collected/;
  32.     }
  33.  
  34.     location /media {
  35.         alias /home/sult/evehub/media/;
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment