My goal is to configure nginx to match locations dynamically like this:
http://www.domain.com/app-one
http://www.domain.com/app-two
http://www.domain.com/app-three
/usr/share/nginx/html/app-one/public
/usr/share/nginx/html/app-two/public
/usr/share/nginx/html/app-three/public
I'm confused how to do this. And if I can do it like this or if it's recommended or best practice to do something like this (I don't want to go the subdomain solution).
If I'm trying this:
location ~ /(^/)+ {
alias /usr/share/nginx/html/$1/public;
index index.html;
}
All I get is an 403.
But there's a way to handle that, right? Do you know how?
PS. Neither I found any explanation via google nor here that helps me.