{"action":"closed","issue":{"url":"https://api.github.com/repos/stnoonan/spnego-http-auth-nginx-module/issues/55","labels_url":"https://api.github.com/repos/stnoonan/spnego-http-auth-nginx-module/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/stnoonan/spnego-http-auth-nginx-module/issues/55/comments","events_url":"https://api.github.com/repos/stnoonan/spnego-http-auth-nginx-module/issues/55/events","html_url":"https://github.com/stnoonan/spnego-http-auth-nginx-module/issues/55","id":105354186,"number":55,"title":"gss_accept_sec_context() failed: :","user":{"login":"MarcinJanowski","id":13016177,"avatar_url":"https://avatars.githubusercontent.com/u/13016177?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcinJanowski","html_url":"https://github.com/MarcinJanowski","followers_url":"https://api.github.com/users/MarcinJanowski/followers","following_url":"https://api.github.com/users/MarcinJanowski/following{/other_user}","gists_url":"https://api.github.com/users/MarcinJanowski/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcinJanowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcinJanowski/subscriptions","organizations_url":"https://api.github.com/users/MarcinJanowski/orgs","repos_url":"https://api.github.com/users/MarcinJanowski/repos","events_url":"https://api.github.com/users/MarcinJanowski/events{/privacy}","received_events_url":"https://api.github.com/users/MarcinJanowski/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-08T11:00:04Z","updated_at":"2015-09-18T14:16:40Z","closed_at":"2015-09-18T14:16:40Z","body":"Please, help me debug this problem:\r\n\r\n```\r\nwmp@ubuntu:/tmp/deb$ klist\r\nTicket cache: FILE:/tmp/krb5cc_1000\r\nDefault principal: MY_USER_NAME@MY_REALM\r\n\r\nValid starting       Expires              Service principal\r\n08.09.2015 12:20:12  08.09.2015 22:20:12  krbtgt/MY_REALM@MY_REALM\r\n        renew until 09.09.2015 00:20:10\r\nwmp@ubuntu:/tmp/deb$ curl --negotiate -u: http://SITE_NAME.MY_REALM/index.php\r\n<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>403 Forbidden</h1></center>\r\n<hr><center>nginx/1.2.1</center>\r\n</body>\r\n</html>\r\nwmp@ubuntu:/tmp/deb$ k\r\nTicket cache: FILE:/tmp/krb5cc_1000\r\nDefault principal: MY_USER_NAME@MY_REALM\r\n\r\nValid starting       Expires              Service principal\r\n08.09.2015 12:20:12  08.09.2015 22:20:12  krbtgt/MY_REALM@MY_REALM\r\n        renew until 09.09.2015 00:20:10\r\n08.09.2015 12:22:06  08.09.2015 22:20:12  HTTP/SITE_NAME.MY_REALM@MY_REALM\r\n        renew until 09.09.2015 00:20:10\r\nwmp@ubuntu:/tmp/deb$\r\n```\r\n\r\nNginx debug:\r\n```\r\n2015/09/08 12:22:06 [debug] 3418#0: post event 0000000001FE83F0\r\n2015/09/08 12:22:06 [debug] 3418#0: delete posted event 0000000001FE83F0\r\n2015/09/08 12:22:06 [debug] 3418#0: accept on 0.0.0.0:80, ready: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: posix_memalign: 0000000001F91D00:256 @16\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 accept: XXX.YYY.ZZZ.68 fd:12\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 event timer add: 12: 60000:1441707786698\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 epoll add event: fd:12 op:1 ev:80000001\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 post event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 delete posted event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 malloc: 0000000001F99F70:1296\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 posix_memalign: 0000000001FC2840:256 @16\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 malloc: 0000000001F9A730:1024\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 posix_memalign: 0000000001F9F660:4096 @16\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http process request line\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 recv: fd:12 100 of 1024\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http request line: \"GET /index.php HTTP/1.1\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http uri: \"/index.php\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http args: \"\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http exten: \"php\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http process request header line\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http header: \"User-Agent: curl/7.38.0\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http header: \"Host: SITE_NAME.MY_REALM\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http header: \"Accept: */*\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http header done\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 event timer del: 12: 1441707786698\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 generic phase: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 rewrite phase: 1\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 test location: \"/\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 test location: ~ \"[^/]\\.php(/|$)\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 using configuration \"[^/]\\.php(/|$)\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http cl:-1 max:1048576\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 rewrite phase: 3\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script complex value\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script var: \"/var/www\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script var: \"/index.php\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script copy: \"\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script file op 0000000000000001 \"/var/www/index.php\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script file op false\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script if\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script if: false\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 post rewrite phase: 4\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 generic phase: 5\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 generic phase: 6\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 generic phase: 7\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 access phase: 8\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 SSO auth handling IN: token.len=0, head=0, ret=401\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 Begin auth\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 Detect SPNEGO token\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 SSO auth handling OUT: token.len=0, head=1, ret=401\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http finalize request: 401, \"/index.php?\" a:1, c:1\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http special response: 401, \"/index.php?\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http set discard body\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 xslt filter header\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 HTTP/1.1 401 Unauthorized\r\nServer: nginx/1.2.1\r\nDate: Tue, 08 Sep 2015 10:22:06 GMT\r\nContent-Type: text/html\r\nContent-Length: 194\r\nConnection: keep-alive\r\nWWW-Authenticate: Negotiate\r\n\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 write new buf t:1 f:0 0000000001FA0380, pos 0000000001FA0380, size: 186 file: 0, size: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http write filter: l:0 f:0 s:186\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http output filter \"/index.php?\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http copy filter: \"/index.php?\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 image filter\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 xslt filter body\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http postpone filter \"/index.php?\" 0000000001FA0568\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 write old buf t:1 f:0 0000000001FA0380, pos 0000000001FA0380, size: 186 file: 0, size: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 write new buf t:0 f:0 0000000000000000, pos 00000000006C16A0, size: 142 file: 0, size: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 write new buf t:0 f:0 0000000000000000, pos 00000000006C11C0, size: 52 file: 0, size: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http write filter: l:1 f:0 s:380\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http write filter limit 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 writev: 380\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http write filter 0000000000000000\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http copy filter: 0 \"/index.php?\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http finalize request: 0, \"/index.php?\" a:1, c:1\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 set http keepalive handler\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http close request\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http log handler\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F9F660, unused: 67\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 event timer add: 12: 65000:1441707791698\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F99F70\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F9A730\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 hc free: 0000000000000000 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 hc busy: 0000000000000000 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 tcp_nodelay\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 reusable connection: 1\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 post event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 delete posted event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http keepalive handler\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 malloc: 0000000001F99F70:1024\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 recv: fd:12 -1 of 1024\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 recv() not ready (11: Resource temporarily unavailable)\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 post event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 delete posted event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http keepalive handler\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 recv: fd:12 1024 of 1024\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 reusable connection: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 malloc: 0000000001F9A730:1296\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 posix_memalign: 0000000001F9F660:4096 @16\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http process request line\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http request line: \"GET /index.php HTTP/1.1\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http uri: \"/index.php\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http args: \"\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http exten: \"php\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http process request header line\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http alloc large header buffer\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 malloc: 0000000001F96220:8192\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http large header alloc: 0000000001F96220 8192\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http large header copy: 999\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 recv: fd:12 1131 of 7193\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http header: \"Authorization: Negotiate YIIF7AYGKw... cute here ...UTz5m063JpHt\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http header: \"User-Agent: curl/7.38.0\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http header: \"Host: SITE_NAME.MY_REALM\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http header: \"Accept: */*\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http header done\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 event timer del: 12: 1441707791698\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 generic phase: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 rewrite phase: 1\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 test location: \"/\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 test location: ~ \"[^/]\\.php(/|$)\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 using configuration \"[^/]\\.php(/|$)\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http cl:-1 max:1048576\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 rewrite phase: 3\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script complex value\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script var: \"/var/www\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script var: \"/index.php\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script copy: \"\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script file op 0000000000000001 \"/var/www/index.php\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script file op false\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script if\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http script if: false\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 post rewrite phase: 4\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 generic phase: 5\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 generic phase: 6\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 generic phase: 7\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 access phase: 8\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 SSO auth handling IN: token.len=0, head=0, ret=401\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 Begin auth\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 Detect SPNEGO token\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 posix_memalign: 0000000001F98230:4096 @16\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 Token decoded: YIIF7AYGKwYBBQUCoIIF4DCCBdygJ... cute here ... tsswOKYx8DYnMU2EpMcOXQj0M\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 Client sent a reasonable Negotiate header\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 GSSAPI authorizing\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 Use keytab /etc/krb5.keytab\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 gss_accept_sec_context() failed: :\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 GSSAPI failed\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http finalize request: 403, \"/index.php?\" a:1, c:1\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http special response: 403, \"/index.php?\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http set discard body\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 xslt filter header\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 HTTP/1.1 403 Forbidden\r\nServer: nginx/1.2.1\r\nDate: Tue, 08 Sep 2015 10:22:06 GMT\r\nContent-Type: text/html\r\nContent-Length: 168\r\nConnection: keep-alive\r\n\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 write new buf t:1 f:0 0000000001FA03F0, pos 0000000001FA03F0, size: 154 file: 0, size: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http write filter: l:0 f:0 s:154\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http output filter \"/index.php?\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http copy filter: \"/index.php?\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 image filter\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 xslt filter body\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http postpone filter \"/index.php?\" 0000000001FA05B8\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 write old buf t:1 f:0 0000000001FA03F0, pos 0000000001FA03F0, size: 154 file: 0, size: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 write new buf t:0 f:0 0000000000000000, pos 00000000006C17E0, size: 116 file: 0, size: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 write new buf t:0 f:0 0000000000000000, pos 00000000006C11C0, size: 52 file: 0, size: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http write filter: l:1 f:0 s:322\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http write filter limit 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 writev: 322\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http write filter 0000000000000000\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http copy filter: 0 \"/index.php?\"\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http finalize request: 0, \"/index.php?\" a:1, c:1\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 set http keepalive handler\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http close request\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http log handler\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F9F660, unused: 104\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F98230, unused: 2426\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 event timer add: 12: 65000:1441707791720\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F9A730\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F99F70\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 hc free: 0000000000000000 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 hc busy: 0000000001FC28C0 1\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F96220\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 reusable connection: 1\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 post event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 delete posted event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http keepalive handler\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 malloc: 0000000001F99F70:1024\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 recv: fd:12 -1 of 1024\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 recv() not ready (11: Resource temporarily unavailable)\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 post event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 delete posted event 0000000001FE84C0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 http keepalive handler\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 recv: fd:12 0 of 1024\r\n2015/09/08 12:22:06 [info] 3418#0: *2 client XXX.YYY.ZZZ.68 closed keepalive connection\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 close http connection: 12\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 event timer del: 12: 1441707791720\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 reusable connection: 0\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F99F70\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000000000000\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000000000000\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001F91D00, unused: 8\r\n2015/09/08 12:22:06 [debug] 3418#0: *2 free: 0000000001FC2840, unused: 0\r\n```\r\n\r\nNginx configuration:\r\n```\r\nSITE_NAME:/etc# cat /etc/nginx/sites-enabled/000-SITE_NAME.MY_REALM \r\nserver {\r\n#       listen   80; ## listen for ipv4; this line is default and implied\r\n        server_name SITE_NAME.MY_REALM;\r\n        root /var/www;\r\n        index index.php;\r\n\r\n        auth_gss on;\r\n#       auth_gss_realm MY_REALM;\r\n        auth_gss_keytab /etc/krb5.keytab;\r\n#       auth_gss_service_name HTTP/SITE_NAME.MY_REALM;\r\n#       auth_gss_service_name SITE_NAME.MY_REALM;\r\n#       auth_gss_service_name HTTP;\r\n        auth_gss_allow_basic_fallback off;\r\n#       auth_gss_format_full off;\r\n\r\n        error_log /var/log/nginx/debug.log debug;\r\n        location / {\r\n                # First attempt to serve request as file, then\r\n                # as directory, then fall back to displaying a 404.\r\n\r\n\r\n        }\r\n\r\n        location ~ [^/]\\.php(/|$) {\r\n                fastcgi_split_path_info ^(.+?\\.php)(/.*)$;\r\n                if (!-f $document_root$fastcgi_script_name) {\r\n                        return 404;\r\n                }\r\n \r\n                fastcgi_pass unix:/var/run/php5-fpm.sock;\r\n                fastcgi_index index.php;\r\n                include fastcgi_params;\r\n        }\r\n}\r\n\r\nSITE_NAME:/etc#\r\n```\r\n\r\nKrb5 configuration:\r\n```\r\nSITE_NAME:/etc# cat /etc/krb5.conf \r\n[libdefaults]\r\n        default_realm = MY_REALM\r\n        default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes256-cts-hmac-sha1-96\r\n        default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes256-cts-hmac-sha1-96\r\n\r\n\r\n[realms]\r\n        MY_REALM = {\r\n                kdc = 172.17.0.101 172.17.0.102 172.17.0.103 172.17.0.114 \r\n                admin_server = 172.17.0.101 \r\n        }\r\n\r\n[domain_realm]\r\n        MY_REALM = MY_REALM\r\n\r\n[logging]\r\n        kdc = FILE:/var/log/kerberos/krb5kdc.log\r\n        admin_server = FILE:/var/log/kerberos/kadmin.log\r\n        default = FILE:/var/log/kerberos/krb5lib.log\r\nSITE_NAME:/etc# klist -kt /etc/krb5.keytab\r\nKeytab name: FILE:/etc/krb5.keytab\r\nKVNO Timestamp         Principal\r\n---- ----------------- --------------------------------------------------------\r\n   4 01/01/70 01:00:00 HTTP/SITE_NAME.MY_REALM@MY_REALM\r\nSITE_NAME:/etc# ls -la /etc/krb5.keytab\r\n-rw------- 1 www-data root 81 Sep  8 12:12 /etc/krb5.keytab\r\nSITE_NAME:/etc#\r\n```\r\n\r\n\r\n\r\n\r\nWhen in nginx configuration i have wrong host in: auth_gss_service_name i have error: gss_acquire_cred() failed: : Used service principal: HTTP/SITE_NAME.MY_REALM@MY_REALM, client: XXX.YYY.ZZZ.68, server: SITE_NAME.MY_REALM, request: \"GET /index.php HTTP/1.1\", host: \"SITE_NAME.MY_REALM\"\r\n\r\nI dont understand why I must in auth_gss_service_name write hostname, why when i have: auth_gss_service_name HTTP in logs i have: Using service principal: HTTP@MY_REALM. Why ths module don't adding server_name automatical?\r\n\r\nAnd, why this dont works?\r\n"}}