标签:auth_basic

nginx 配置auth basic使matomo访问统计接口

nginx 配置auth basic使matomo访问统计接口,有时候我们A目录下有一些php程序,A目录下还有一个B文件夹,但是我们需要让外部访问B文件夹的一些文件,该怎样做呢?
|/www/html
|___ /www/html/matomo

   server {
          listen 443;
          server_name www.example.com;
           root   /www/html;
            auth_basic "Please input password";
            auth_basic_user_file /usr/local/nginx/db/passwd.db;
            index  index.html index.htm index.php;

            location /matomo {
            #关闭顶级目录认证
            auth_basic off;          
            location = /matomo/piwik.js {
            #关闭piwik.js文件认证
            auth_basic off;
             }
 (查看更多...)