欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

nginx配置,

来源: javaer 分享于  点击 29204 次 点评:164

nginx配置,


proxy_pass http://java/; 最后有/转发到http://java/ 没有/需要转发到http://java/location/




upstream node {

        server 00.00.000.000:3000;
    }


    upstream java {
        server 00.00.000.000:8080;
    }


    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        listen       81 default_server;
        server_name  _;
        root         /usr/share/nginx/html;


        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;


        location /api/ {
            proxy_pass http://java/;
        }


        location / {
            proxy_pass http://node/;

        }

       error_page 404 /404.html;
            location = /40x.html {
        }


        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

相关文章

    暂无相关文章
相关栏目:

用户点评