Nginx反向代理,代理H5前端 ,java后端,使用服务器+finalshell+vpn

使用前确认已经安装好nginx,这里我使用的是普通的nginx,注意不是Docker版本的nginx

输入nginx -t 查询一下,自己的nginx config.nginx在那个包下,方便查询

 

使用cat nginx.conf命令,进入需要配置的conf中(这个是我使用的server[

    server {
        listen       82;
        server_name  localhosts;

        location / {
            root   /usr/soft/nginx/html/threephone;
            index  index.html index.htm;
        }

        location /prod-api/ {
            proxy_pass http://ip:8080/;
        }

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

])

这时候可以看见我们已经,进入到nginx.conf中

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值