I want to configure a location directive that is inherited by all server blocks.

In Apache, if I use the Alias directive outside the Virtualhost block, it applies to all virtualhosts, each host can access the location provided.

In Nginx, when I put the location directive outside a server block, it says "location directive is not allowed here".

Is there a better solution than re-defining the location in each server block?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top