Nginx基本身份验证要求再次登录

时间:2018-09-13 06:21:23

标签: http nginx nginx-reverse-proxy

我正在Ubuntu 16服务器上运行nginx。到昨天一切都很好。

server {
    listen 80;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
server_name aims.thetowertech.com;

 access_log /var/log/nginx/aims.access.log;
    error_log /var/log/nginx/aims.error.log;


          location / {
        proxy_pass         http://192.168.7.24;
        proxy_set_header Connection "Keep-Alive";
      proxy_set_header Proxy-Connection "Keep-Alive";

    }

    listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/aims.thetowertech.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/aims.thetowertech.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    if ($scheme != "https") {
     return 301 https://$host$request_uri;
    } # managed by Certbot

}

这是我的配置。现在的问题是从早上开始,一旦api向系统nginx发送请求,再次要求HtTP登录。在每个请求上都要求登录。

你知道是什么问题吗?

0 个答案:

没有答案
相关问题