频道栏目
首页 > 资讯 > Linux > 正文

nginx验证

11-08-12        来源:[db:作者]  
收藏   我要投稿

生成密码文件

htpasswd -b -c 文件名 用户名 密码

编辑nginx.conf

server {

        listen       80;

        server_name  localhost;

        auth_basic "input you user name and  password";

        auth_basic_user_file /usr/local/nginx/conf/nginx_passwd;

        #charset koi8-r;

 

        #access_log  logs/host.access.log  main;

 

        location / {

            root   /var/www/html;

            index  index.html index.htm;

        }

        location /soft{

             autoindex on;

             autoindex_exact_size off;

             root /var/www/html;

        }

相关TAG标签
上一篇:rsync服务器搭建
下一篇:Android新手入门FAQ
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站