Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.99 KB | None | 0 0
  1. # run command:
  2. docker run --restart unless-stopped --name nginx-b -p 80:80 -p 443:443 -v /host/nginx-b.conf:/etc/nginx/nginx.conf:ro --link=rancher-server -d nginx
  3.  
  4. # nginx.conf
  5. events {
  6.   worker_connections  4096;  ## Default: 1024
  7. }
  8.  
  9. http {
  10.  
  11.   server {
  12.     listen 80;
  13.     server_name _;
  14.  
  15.     access_log /var/log/nginx/access.log;
  16.     error_log  /var/log/nginx/error.log;
  17.  
  18.     location / {
  19.       proxy_set_header Host $host;
  20.       proxy_set_header X-Forwarded-Proto $scheme;
  21.       proxy_set_header X-Forwarded-Port $server_port;
  22.       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  23.       proxy_pass http://10.100.10.1:8080;
  24.         proxy_http_version 1.1;
  25.       proxy_set_header Upgrade $http_upgrade;
  26.       proxy_set_header Connection "upgrade";
  27.       # This allows the ability for the execute shell window to remain open for up to 15 minutes. Without this parameter, the default is 1 minute and will automatically close.
  28.       proxy_read_timeout 900s;
  29.     }
  30.   }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement