Nginx端口映射(外网访问)

编辑外网访问配置文件
在这里插入图片描述
在这里插入图片描述

    location ^~/contact-web {
        proxy_pass       http://127.0.0.1:8990/contact-web;
}

重启nginx

#nginx -t     #检测配置文件内容是否有误
#/etc/init.d/nginx realod    #重载,,#线上服务,尽量不重启。

上面两部就行了
#清除nginx缓存
npinx -s reload

在这里插入图片描述

发布了349 篇原创文章 · 获赞 60 · 访问量 10万+

猜你喜欢

转载自blog.csdn.net/qq_40907977/article/details/103315322