Guest User

Untitled

a guest
Jan 16th, 2016
973
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     # Open Server
  2.     server {
  3.     listen         80;
  4.     server_name    YOURSITE.TLD;
  5.     access_log off;
  6.     error_log off;
  7.     root /PATH/TO/YOUR/DOMAIN/public_html;
  8.  
  9.     # Max Upload
  10.     client_max_body_size    8192M;
  11.    
  12.     # Gzip
  13.     gzip on;
  14.     gzip_disable "msie6";
  15.     gzip_vary on;
  16.     gzip_comp_level  4;
  17.     gzip_min_length  1000;
  18.     gzip_proxied     any;
  19.     gzip_buffers 16 8k;
  20.     gzip_http_version 1.1;
  21.     gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  22.  
  23.     # Stats
  24.     location /nginx_status {
  25.         stub_status on;
  26.     }
  27.  
  28.     # Root
  29.         location / {
  30.         index index.html index.htm index.php;
  31.         }
  32.  
  33.     # NodeBB
  34.         location  ^~ /forum {
  35.         proxy_set_header X-Real-IP $remote_addr;
  36.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  37.         proxy_set_header Host $http_host;
  38.         proxy_set_header X-NginX-Proxy true;
  39.         proxy_pass http://io_nodes;
  40.         proxy_redirect off;
  41.         proxy_http_version 1.1;
  42.         proxy_set_header Upgrade $http_upgrade;
  43.         proxy_set_header Connection "upgrade";
  44.         }
  45.  
  46.     # Cache
  47.         location ~*  .(jpg|jpeg|png|gif|ico|css|js)$ {
  48.         expires 365d;
  49.         }
  50.  
  51.     }
  52.     # Close Server
  53.  
  54.     # NodeBB Upstream
  55.     upstream io_nodes {
  56.         ip_hash;
  57.         server 127.0.0.1:4567;
  58.     }
RAW Paste Data