nginx不同路径映射不同域名或者不同地址

server {
        listen        23132;
        server_name  www.yuming.vip;
	location / {
			
	}
        location /app {
		alias   "C:\phpstudy_pro\WWW\vue";
		index index.html index.html;
        }
	location /getNews {
        	proxy_pass https://www.yuming.vip:12345;
    	}
    	location /getProducts {
      	 	 proxy_pass https://yuming.vip:23131/app/grade/maxAll;
    	}
    
}

非根本目录下不能用户root 必须用alias

你可能感兴趣的:(nginx,运维,服务器)