我有非root ssh访问运行nginx的服务器。 如何在没有root权限访问/etc/nginx/的configuration文件的情况下密码保护一个目录(类似于.htaccess和Apache)?
简短的回答:你不能。 nginx没有等同于.htaccess文件的用户configuration,因为开发者决定这是错误的,并没有听说过这种可选的可能性。 https://www.nginx.com/resources/wiki/start/topics/examples/likeapache-htaccess/