Not an advanced guide, just keep forgetting so record it
You only need to create a web.conf /etc/nginx/conf.d/
into it , and the configuration is very simple
# /path 路径反向代理
server {
location /path {
proxy_pass http://127.0.0.1:8080;
}
}
# 配合dns解析不同三级域名反向代理 + 前端history路由模式
server {
server_name cloudeve.xxx.com;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:8080;
}
}
nginx -s reload
it can run