摘要: 前言 有一些静态网站资源,我们不希望所有人都可以访问,那么可以简单使用nginx内置模块实现身份认证。 实现 修改配置文件: auth_basic "nginx basic http test"; auth_basic_user_file /etc/nginx/htpasswd; # 认证文件 生成 阅读全文
posted @ 2023-01-23 21:22 Hello_wshuo 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 前言 针对nas服务器文件下载或者需要索引一些静态二进制文件的地方,可以利用nginx自带的索引文件功能实现。 root /var/www/html; #索引目录 autoindex on; autoindex_exact_size off; autoindex_localtime on; 样式感觉 阅读全文
posted @ 2023-01-23 13:45 Hello_wshuo 阅读(95) 评论(0) 推荐(0) 编辑