nginx.dev.conf 1.58 KB
Newer Older
nabil el mahiri committed
1 2 3
# NGINX CONF ATLAS VOYAGES

upstream node_atlasvoyage_de {
nabil el mahiri committed
4
  server unix:/Users/hotelia/nodejs/atlasvoyages.com/apps/atlas-voyages/http.sock;
nabil el mahiri committed
5
  #  server unix:/atlasvoyages/apps/atlas-voyages/http.sock;
nabil el mahiri committed
6
   # server localhost:3990;
nabil el mahiri committed
7 8 9
}

server {
nabil el mahiri committed
10 11
  listen 80 default_server;
  listen [::]:80 default_server;
nabil el mahiri committed
12

nabil el mahiri committed
13
 set $public /atlasvoyages/apps/atlas-voyages/public;
nabil el mahiri committed
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 67 68

#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;
  }




}