I have set default root directory as $root to listen on port 80.
Now I want to serve from different directory (share1) if path is started with /user i.e. /user , /user/xyz , /user/abc all should be serve from share1 directory..
map $http_user_agent $root {
"~*android" /home/vishant/devcenter/wava-v1.1/android;
"~iPhone" /home/vishant/devcenter/wava-v1.1/ios;
default /home/vishant/devcenter/wava-v1.1/ios;
}
server {
listen 80;
root $root;
index index.html;
location /user {
alias /home/vishant/devcenter/share1;
}
}
In short i want something like below..though it's not correct...
location /user/* {
alias /home/vishant/devcenter/share1;
}
I want all the request starting with /user (/user/abc , /user/xyz) should hit the index.html file.