nginx+springboot配置
转载于:https://www.cnblogs.com/langdangyunliu/p/9548414.html
1、spring boot 访问地址http://localhost:13000/test/hello
2、配置nginx.conf文件
upstream my_ngix {
erver localhost:13000
}
erver {
listen 8010
erver_name localhost
location ^~ /test/hello/ {
roxy_set_header Host $host
roxy_set_header X-Real-IP $remote_addr
roxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for
roxy_pass http://my_ngix/test/hello/
}
}
ginx -s reload :重启
tart nginx : 启动ngnix
ginx -t :检查 nginx.conf配置文件语法
ginx -s stop : 停止