Docker 搭配 Nignx Proxy的conf檔正確寫法

 server {

    server_name docker.sitename.com;


    location ~/ {

    # prevents 502 bad gateway error

    proxy_buffers 8 32k;

    proxy_buffer_size 64k;


    client_max_body_size 75M;


    # redirect all HTTP traffic to localhost:8088;

    proxy_pass http://localhost:9000;

    proxy_set_header X-Real-IP $remote_addr;

    proxy_set_header Host $http_host;

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    #proxy_set_header X-NginX-Proxy true;


    # enables WS support

    proxy_http_version 1.1;

    proxy_set_header Upgrade $http_upgrade;

    proxy_set_header Connection "upgrade";


    proxy_read_timeout 999999999;

}

留言

熱門文章