数码产品

创建htpasswd文件在nginx (没有 apache)

Create htpasswd file for nginx (without apache)

If you're like me, and use Nginx instead of Apache, you could eventually face this problem: Create an htpasswd file (for htaccess "authentication").

To create your file, without installing Apache, just run:

$ printf "USER:$(openssl passwd -crypt PASSWORD)\n" >> .htpasswd

Replace USER and PASSWORD for your user and password :)

posted @ 2019-12-11 15:06  Hackerman  阅读(399)  评论(0编辑  收藏  举报
数码产品