I would like to be able to specify directives according to the full Unix path of the files in the same way as I would with Apache. Is this possible in nginx?
Apache e.g.
[code]
<Directory /path/to/my/dir>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
[/code]
I am creating a web-based dashboard for my nginx setup and would like to set up http authentication on a per directory basis. The reason that I need to be able to use the full Unix path is that my virtual host serves different roots depending on the HTTP host so using location isn't sufficient.
I considered using if statements but http_auth_basic is only allowed inside location directives:
[code]
location / {
auth_basic "Restricted";
auth_basic_user_file conf/htpasswd;
}
[/code]