Open xrff opened 7 years ago
我尝试了一下nginx会报错:nginx: [emerg] "auth_basic" directive is not allowed here in /root/nginx/conf/nginx.conf:30
配置是这样的
tcp { upstream ha { server 192.168.164.245:2255; }
server { listen 2255; proxy_pass ha; auth_basic "login test"; auth_basic_user_file conf/htpasswd; }
}
请问是配置有问题吗还是tcp模块不支持auth_basic验证?
应该是不支持,我今天也用到了,会报错。auth_basic是在ngx_http_auth_basic_module定义的,但这个项目中没有类似的模块
我尝试了一下nginx会报错:nginx: [emerg] "auth_basic" directive is not allowed here in /root/nginx/conf/nginx.conf:30
配置是这样的
tcp { upstream ha { server 192.168.164.245:2255; }
}
请问是配置有问题吗还是tcp模块不支持auth_basic验证?