当前位置首页 > Nginx知识

nginx+springboot配置

阅读次数:209 次  来源:admin  发布时间:

转载于: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 : 停止

上一篇:Nginx优化
下一篇:[原创]debian10搭建Jira+Confluence+Bitbucket项目管理工具(二)--安装jira8.5.7-RJ