Advertisement
Guest User

Server Nginx

a guest
Dec 3rd, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.68 KB | None | 0 0
  1.  
  2. ################################################
  3. # SERVER
  4. ################################################
  5. server {
  6.         listen 80;
  7.         listen [::]:80;
  8.         server_name  www.ddp.abc.com;
  9.  
  10.         passenger_enabled on;
  11.        
  12.         # Tell Passenger where the app is.
  13.         passenger_app_root location/snaps/current;
  14.  
  15.         # The entry point is server.js, not app.js. Tell Passenger
  16.         # about this.
  17.         passenger_app_type node;
  18.         passenger_startup_file main.js;
  19.  
  20.         # The static assets are in `static_files` instead, so tell Nginx about it.
  21.         root location/snaps/current/programs/web.browser/app;
  22.  
  23.         # There is no `tmp` dir. No problem, we can tell Passenger
  24.         # to look for restart.txt in /webapps/foo instead.
  25.         passenger_restart_dir location/snaps/current/tmp;
  26.  
  27.      
  28.  
  29.     }
  30.  
  31.  
  32. server {
  33.         listen 80;
  34.         listen [::]:80;
  35.         server_name  www.abc.com;
  36.  
  37.         passenger_enabled on;
  38.  
  39.         #Specific to server
  40.         passenger_set_cgi_param DDP_DEFAULT_CONNECTION_URL http://www.ddp.abc.com;
  41.  
  42.         # Tell Passenger where the app is.
  43.         passenger_app_root location/snaps/current;
  44.  
  45.         # The entry point is server.js, not app.js. Tell Passenger
  46.         # about this.
  47.         passenger_app_type node;
  48.         passenger_startup_file main.js;
  49.  
  50.         # The static assets are in `static_files` instead, so tell Nginx about it.
  51.         root location/snaps/current/programs/web.browser/app;
  52.  
  53.         # There is no `tmp` dir. No problem, we can tell Passenger
  54.         # to look for restart.txt in /webapps/foo instead.
  55.         passenger_restart_dir location/snaps/current/tmp;
  56.  
  57.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement