nginx.dev.conf 1.48 KB
Newer Older
nabil el mahiri committed
1 2 3 4 5 6 7
# NGINX CONF ATLAS VOYAGES

upstream node_atlasvoyage_de {
   server unix:/Users/hotelia/nodejs/atlasvoyages.com/apps/atlas-voyages/http.sock;
}

server {
nabil el mahiri committed
8
 listen 7778; 
nabil el mahiri committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
 
 set $public /Users/hotelia/nodejs/atlasvoyages.com/apps/atlas-voyages/public;


#access_log /Users/hotelia/atlasvoyages/pine-server-old/logs/atlas-voyages.access.log;
#error_log /Users/hotelia/atlasvoyages/pine-server-old/logs/atlas-voyages.error.log;


  location / {

    # Set this to your upstream module.
    proxy_pass http://node_atlasvoyage_de;


    proxy_read_timeout 40s;
    proxy_send_timeout 20s;
    proxy_connect_timeout 5s;

    proxy_buffers 8 32k;
    proxy_buffer_size 64k;

    # Proxy headers.
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_set_header X-NginX-Proxy true;

    # these for for socket
    #    proxy_set_header Upgrade $http_upgrade;
    #    proxy_set_header Connection "upgrade";
    #    proxy_cache_bypass $http_upgrade;
    proxy_set_header Connection "";
    proxy_http_version 1.1;
    proxy_redirect off;


  }


  # Cache busting for scripts
  location ~ ^/scripts/(.+)/\d+\.([^/]+)\.js$ {
    alias $public/scripts/$1/$2.js;
    add_header Vary Accept-Encoding;
    #expires max;
  }

  # CSS and Javascript
  
  location ~ ^/(robots.txt|sitemap.xml|favicon.ico|img/|css/|scripts/|assets/) {
    root   $public;
    expires 24h;
  }




}