This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 23rd, 2012  |  syntax: None  |  size: 1.44 KB  |  views: 82  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. #user  nobody;
  3. worker_processes  1;
  4.  
  5. #error_log  logs/error.log;
  6. #error_log  logs/error.log  notice;
  7. #error_log  logs/error.log  info;
  8.  
  9. #pid        logs/nginx.pid;
  10.  
  11.  
  12. events {
  13.     worker_connections  1024;
  14. }
  15.  
  16.  
  17. http {
  18.     include       mime.types;
  19.     default_type  application/octet-stream;
  20.  
  21.     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  22.     #                  '$status $body_bytes_sent "$http_referer" '
  23.     #                  '"$http_user_agent" "$http_x_forwarded_for"';
  24.  
  25.     #access_log  logs/access.log  main;
  26.  
  27.     sendfile        on;
  28.     #tcp_nopush     on;
  29.  
  30.     #keepalive_timeout  0;
  31.     keepalive_timeout  65;
  32.  
  33.     #gzip  on;
  34.  
  35.     upstream app_server_djangoapp {
  36.             server localhost:8001 fail_timeout=0;
  37.     }
  38.  
  39.     server {
  40.             listen 80 spdy;
  41.             server_name localhost;
  42.             listen 443 ssl spdy default_server;
  43.  
  44.              ssl_certificate /usr/local/conf/server.crt;
  45.  
  46.              ssl_certificate_key /usr/local/conf/server.key;
  47.  
  48.  
  49.             access_log  /var/log/nginx/guni-access.log;
  50.             error_log  /var/log/nginx/guni-error.log info;
  51.  
  52.             keepalive_timeout 5;
  53.  
  54.             # path for static files
  55.             root /home/xxxx;
  56.  
  57.             location / {
  58.                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  59.                 proxy_set_header Host $http_host;
  60.                 proxy_redirect off;
  61.  
  62.                 if (!-f $request_filename) {
  63.                     proxy_pass http://app_server_djangoapp;
  64.                     break;
  65.                 }
  66.             }
  67.  
  68.     }
  69.    
  70.  
  71. }
clone this paste RAW Paste Data