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

前端 未结 11 2782
盖世英雄少女心
盖世英雄少女心 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 11:59

    Do you want a MORE secure password hash with nginx basic_auth? Do this:

    echo "username:"$(mkpasswd -m sha-512) >> .htpasswd
    

    SHA-512 is not considered nearly as good as bcrypt, but it's the best nginx supports at the moment.

提交回复
热议问题