server {
listen 7008;
server_name 127.0.0.1;
location /user {
proxy_pass http://127.0.0.1:7003;
}
location / {
root C:/aa;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
nginx 里面相应的设置 ,监听7008端口,当访问/时,加载对应前台页面,访问/user时,从后台获取数据