I’m still not sure you’ve actually given a reason why you need an alias.
Those rules appear to be more or less a direct copy of the rules which
are at Redirect Notice.
In my personal experience, they work perfectly well on ownCloud 6.
You’re almost certainly seeing “outside location” errors because of
issues with the root path or because of the way you have written the
included file.
I’d suggest following the exact instructions in the above link without
an included file and without an unnecessary alias.
If they don’t work, try rewriting them without nested locations. Use the
full path for each location. Read the docs at Module ngx_http_core_module to
understand how locations are matched and this entire problem will be
much easier to understand.
If you can get them working without nested locations, you can nest some
if you want, but consider reading this thread about nested locations: Nested Locations Better???.
–
Jim O.
“Never argue with a fool, onlookers may not be able to tell the
difference.” - Mark Twain
I’m still not sure you’ve actually given a reason why you need an alias.
Infact, I don’t have a good reason for using alias, I just found this
proposal on the web while I was trying to configure this.
Blindly following a “tutorial” without understanding what it does can be
a recipe for problems like this.
I also would like to use includes, because I might need to add other
services on the host and keeping things clean.
The idea is to define some subdirectories as is they were “new root”.
I agree that they provide for easy maintenance. However, in this case
you have errors are coming from the included file. That’s why I said to
try putting it all in your nginx.conf first until you get it working.
For me (and perhaps only me), I find it easier working with one file
when I’m trying to debug a configuration problem.
Sorry if my english isn’t clear…
Thank you for links, I will read.
–
Jim O.
“Never argue with a fool, onlookers may not be able to tell the
difference.” - Mark Twain