这是我的nginx vhost conf:
upstream demo {
server 127.0.0.1:9002 max_fails=250 fail_timeout=180s;
}
server {
listen 80;
server_name _;
root /home/web/public;
location /demo/ {
proxy_pass http://demo/;
}
location /demo/assets/ {
#this is where I need to point localhost/demo/assets (and all of it's subfolders) to another folder
#the line below obviously doesn't work
root /home/user/Workspaces/demo/public;
}
}
根文件夹指向/home/web/public
,但我需要网址localhost/demo/assets/
及其所有子文件夹转到另一个(外部)文件夹。我该怎么做?
我正在运行nginx 1.4.3