Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # run command:
- 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
- # nginx.conf
- events {
- worker_connections 4096; ## Default: 1024
- }
- http {
- server {
- listen 80;
- server_name _;
- access_log /var/log/nginx/access.log;
- error_log /var/log/nginx/error.log;
- location / {
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Port $server_port;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://10.100.10.1:8080;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- # 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.
- proxy_read_timeout 900s;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement