2017-05-06 3 views
1
내가 주위를 봤

https://joshuarogers.net/passing-static-credentials-upstream-through-nginx http://shairosenfeld.blogspot.jp/2011/03/authorization-header-in-nginx-for.html인증 헤더 작업

을 does't 및 기본 인증에 프록시에 Nginx의 사용에 대한이 두 가지 튜토리얼을 발견했다. 내 로컬 호스트에 Nginx 서버를 구성하고 다시 시작했습니다. 그러나 그것은 작동하지 않는 것 같습니다. 승인없이 호스트 (http://10.211.55.12:5601http://10.211.55.12:80은 이전과 동일한 페이지로 리디렉션 됨)에 액세스 할 수 있습니다.

"http://10.211.55.12:5601"의 서비스는 기바나입니다. 정식으로 증권화하고 싶습니다.

# Default server configuration 
    # 
    server { 
     listen 80 default_server; 
     listen [::]:80 default_server; 
     server_name _; 
     location/{ 
      proxy_set_header Host $host; 
      proxy_set_header X-Real-IP $remote_addr; 
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
      proxy_pass http://10.211.55.12:5601; 
      proxy_set_header Authorization "Basic a2luZzppc25ha2Vk"; 
     } 
    } 

답변

3

같은 문제. 이 worked

echo -n "user:pass" | base64

대신

echo "user:pass" | base64

+0

귀하의 답변을 주셔서 감사합니다,하지만 나를 위해 does't 작업. 인증 팝업이 없거나 다른 사람이 로그인해야합니다. –