配置nginx参数配置
server {
listen 80;
server_name 127.0.0.1;
root 项目存放完整路径;
#charset koi8-r;
#access_log logs/host.access.log main;
location /front {
#root html;
#index index.html index.htm;
proxy_pass http://127.0.0.1:8080/front;
client_max_body_size 100m;
}
location /userInfo{
if ( $query_string ~* ^(.*)userName=xiaoming(.*)$ ){
proxy_pass http://127.0.0.1:9081;
}
if ( $query_string ~* ^(.*)userName=xiaohua(.*)$ ){
proxy_pass http://127.0.0.1:9082;
}
}
location / {
index index.html;
try_files $uri $uri/ /index.html;
}
}