2021-04-11 openssl 静态服务器

[root@2a2d6ffd4d79 nginx]# printf "test:$(openssl passwd 1234567890)" > .passwd # 这样只能生成最长8位的密码
Warning: truncating password to 8 characters

printf "test:$(openssl passwd -5 1234567890123456@Aab)" > .passwd # 这样可以突破8位密码长度
下面可以使静态服务器增加密码验证

        location /static {
            alias /srv/http/statics;
            autoindex on;
            auth_basic "DW Center";
            auth_basic_user_file  /etc/nginx/.passwd;
        }
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容