使用前确认已经安装好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中

最低0.47元/天 解锁文章
4万+

被折叠的 条评论
为什么被折叠?



