Sorry for the delay. It wasn't an error but the web pages were out of whack.
Some of the files were now found.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,251908,251952#msg-251952
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx
On Sat, Jul 19, 2014 at 11:51 PM, martyparish wrote:
> Unfortunately it did not. I was really hoping to do this with try_files
> instead of "if" and rewrite!
>
what error did you get
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailm
Unfortunately it did not. I was really hoping to do this with try_files
instead of "if" and rewrite!
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,251908,251941#msg-251941
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailm
On Sat, Jul 19, 2014 at 11:34 PM, martyparish wrote:
>
> actually this part was wrong;
> if (!-f $site_folder) {
> rewrite ^/[^/]+/(.*) /$1;
> }
>
> needs to be:
>
> if (!-d /etc/nginx/html/production/$site_folder) {
> rewrite ^/[^/]+/(.*) /$1;
> }
>
> * changed -f to -d
> ** had to add root path
actually this part was wrong;
if (!-f $site_folder) {
rewrite ^/[^/]+/(.*) /$1;
}
needs to be:
if (!-d /etc/nginx/html/production/$site_folder) {
rewrite ^/[^/]+/(.*) /$1;
}
* changed -f to -d
** had to add root path before $site_folder
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,
For anyone who comes across this scenario, here is how I got it working:
# get the first folder name into a variable ($site_folder)
map $uri $site_folder {
~^/(?P[a-zA-Z]+)/.*$folder ;
}
...
server {
...