通过nginx代理部署golang|通过nginx代理部署golang ApiServer

server { listen80; server_namedomain.com; send_timeout6000; charset utf-8; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass_request_headers on; proxy_pass http://127.0.0.1:3000; }

    推荐阅读