Sep 26, 2015
0
Level 5
Nginx site/server based on hostname + uri segment?
I'm wondering if there is a way I can set up two different nginx sites (or servers, unsure the proper term) that will filter requests based not only on hostname, but the first segment of a uri.
Meaning, all requests sent to http://url.com will have a document root of /path/project/public and all requests sent to http://url.com/admin will have a document root of /path/admin/public. Is this possible?
EDIT: I am wondering if this is similar to the posts I've seen about setting up laravel at a sub directory? I'm not sure, I usually associate something like that with shared hosting. /shrug
Please or to participate in this conversation.