nginx 代理简单笔记
一些windows 重启指令 到nginx根目录下: start nginx 启动, 更新启动 nginx.exe -s reload , 停止 nginx.exe -s stop
nginx.conf 文件修改配置:
server {
listen 8800;
server_name localhost;
#后端接口地址 //这里访问出来的是 localhost:8800/api => http://x.x.x.x:7010
location /api {
proxy_pass http://x.x.x.x:7010/;
}
#后端接口地址 //这里访问出来的是 localhost:8800/api => http://x.x.x.x:7010/api
location /api {
proxy_pass http://x.x.x.x:7010; //注意:这里的 没有‘/’
}
#前端页面地址
location /epf-yzt-app{
client_max_body_size 100m;
alias D:/hjysetting/epf-yzt-app;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}

浙公网安备 33010602011771号