Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要使用 ngix 保护像 site.com/logger 这样的站点路径。我应该如何正确地做到这一点?最佳做法是什么?
密码保护还是其他?
location ^~ /path-to-dir {deny all}
或者
location /path-to-dir { auth_basic "closed site"; auth_basic_user_file /full-path-to-htpasswd; }