前言
80: nginx
8080端口:api 服务由api.x.com
8888端口:dashboard 控制台 dashboard.x.com
3000端口:mp 微信ui mp.x.com
目的
节省成本都放一个主机上面。
在centos 7 安装 nginx
yum list nginx
sudo yum install nginx
修改配置文件
#查找nginx 配置文件位置
vi /etc/nginx/nginx.conf
server {
listen 80;
server_name mp.x.com;
location / {
proxy_pass http://localhost:3000;
# proxy_set_header Host $host;
}
}
server {
listen 80;
server_name api.x.com;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
}
}
server {
listen 80;
server_name dashboard.x.com;
location / {
proxy_pass http://localhost:8888;
}
}
#启动
sudo systemctl start nginx
部署管理后台
安装docker
spring boot jar 参数调整
微信登陆配置
微信支付配置
参考
详细的nginx
https://blog.csdn.net/qq_37638061/article/details/90581358
网友评论