nginx 多个 root页面配置
server {
listen 80;
server_name 192.168.5.205;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /home/alidata/java_test/comvee_dz/web-front/;
index login/login.html;
}
location /admin {
alias /home/alidata/java_test/comvee_dz/web-admin/;
index login.html;
}
}
反向代理
server {
listen 80;
server_name 192.168.1.125;
location / {
root D:/IdeaProjects/nanan/comvee_nanan/trunk/web-front/;
index login/login.html;
}
location /hxyy/ {
proxy_pass http://localhost:8080/hxyy/;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
网友评论