Nginx gives an Internal Server Error 500 after I have configured basic auth

前端 未结 11 2811
盖世英雄少女心
盖世英雄少女心 2020-12-16 11:29

I am trying to do basic auth on Nginx. I have version 1.9.3 up and running on Ubuntu 14.04 and it works fine with a simple html file.

Here is the html file:

11条回答
  •  长情又很酷
    2020-12-16 12:00

    Well, just use correct RFC 2307 syntax:

    passwordvalue          = schemeprefix encryptedpassword
    schemeprefix           = "{" scheme "}"
    scheme                 = "crypt" / "md5" / "sha" / altscheme
    altscheme              = "x-" keystring
    encryptedpassword      = encrypted password
    

    For example: sha1 for helloworld for admin will be * admin:{SHA}at+xg6SiyUovktq1redipHiJpaE=

    I had same error cause i wrote {SHA1} what against RFC syntax. When i fixed it - all worked like a charm. {sha} will not work too. Only correct {SHA}.

提交回复
热议问题