CentOS7 安装最新版本号 awstats ,在httpd.conf 中增加了alias,能够直接訪问网址就进入 浏览。十分不安全。

给訪问加上password的方法:

[root@localhost wwwroot]# htpasswd -bc /home/awstats/wwwroot/.htpasswd aaa 123456

[root@localhost wwwroot]# nano /etc/httpd/conf/httpd.conf #改动 Apache 配置文件。给awstats 加上限制:

Alias /awstatscss "/home/awstats/wwwroot/css/"
Alias /awstatsicons "/home/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/home/awstats/wwwroot/cgi-bin/" #
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/home/awstats/wwwroot">
Options None
AllowOverride None AuthName "Members Only"
AuthType basic
AuthUserFile /home/awstats/wwwroot/.htpasswd
require valid-user #Require all granted
</Directory>

在又一次訪问  http://www.zbphp.com/awstats/awstats.pl 会出现须要输入password的提示(by default7#zbphp.com):

Linux Apache 给 awstats 创建 訪问password的更多相关文章

  1. 让Apache 和nginx支持跨域訪问

    1,怎样让Apache支持跨域訪问呢? 步骤: 改动httpd.conf,windows中相应的文件夹是:C:\wamp\bin\apache\Apache2.4.4\conf\httpd.conf ...

  2. ORA-24247: 网络訪问被訪问控制列表 (ACL) 拒绝

     ORA-24247: 网络訪问被訪问控制列表 (ACL) 拒绝 注意:须要在system用户下使用命令 须要先使用 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL 创建訪问控 ...

  3. 关于Windows通过远程桌面訪问Ubuntu

    关于Windows通过远程桌面訪问Ubuntu 问题及目标 Window环境通过远程桌面訪问Ubuntu Ubuntu机器端 1.  安装所需软件包 sudoapt-get install xrdp ...

  4. 使用apache htpasswd生成加密的password文件,并使用.htaccess控制文件夹訪问

    htpasswd 是apache的小工具.在apache安装文件夹bin下可找到. Usage: htpasswd [-cmdpsD] passwordfile username htpasswd - ...

  5. [加入用户]解决useradd 用户后没有加入用户Home文件夹的情况,Linux改变文件或文件夹的訪问权限命令,linux改动用户password,usermod的ysuum安装包。飞

    usermod的yum安装包: shadow-utils 将nobody用户加入到nogroup 组: usermod -g nogroup nobody cat /etc/passwd|grep n ...

  6. linux创建文件树,孩子兄弟树(或广义表),创建文件树及其訪问

    假设在Linux下要訪问一个目录. 我们须要知道一下系统调用. 1.opendir(path); //注意path是绝对路径 2.ptr=readdir(dir);//dir 为opendir();正 ...

  7. Linux Centos7 Apache 訪问 You don&#39;t have permission to access / on this server.

    折腾了非常久,今天才找到了最正确的答案.感言真不easy. 百度出来的99%都是採集的内容.全都是错误的. You don't have permission to access / on this ...

  8. Linux 终端訪问 FTP 及 上传下载 文件

    今天同事问我一个问题,在Linux 下訪问FTP,并将文件上传上去. 我之前一直是用WinSCP工具的. 先将文件从linux copy到windows下,然后在传到ftp上. google 一下. ...

  9. sqlserver 创建用户仅仅能訪问指定视图

    use crm --当前数据库创建角色 exec sp_addrole 'rapp' --分配视图权限 GRANT SELECT  ON veiw TO [角色] --指定视图列表 GRANT SEL ...

随机推荐

  1. Leetcode with Python

    1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a ...

  2. Octave 里的 fminunc

    ptions = optimset('GradObj', 'on', 'MaxIter', '100'); initialTheta = zeros(2,1); [optTheta, function ...

  3. Spring @注解详解(转)

    1.@controller 控制器(注入服务) 2.@service 服务(注入dao) 3.@repository dao(实现dao访问) 4.@component (把普通pojo实例化到spr ...

  4. 【bzoj4184】shallot 线段树+高斯消元动态维护线性基

    题目描述 小苗去市场上买了一捆小葱苗,她突然一时兴起,于是她在每颗小葱苗上写上一个数字,然后把小葱叫过来玩游戏. 每个时刻她会给小葱一颗小葱苗或者是从小葱手里拿走一颗小葱苗,并且 让小葱从自己手中的小 ...

  5. [BZOJ2678][Usaco2012 Open]Bookshelf

    P.S. 偶然间发现可以用 markdown... [BZOJ2678][Usaco2012 Open]Bookshelf 试题描述 When Farmer John isn't milking co ...

  6. BZOJ 4556 [Tjoi2016&Heoi2016]字符串 ——后缀数组 ST表 主席树 二分答案

    Solution 1: 后缀数组暴力大法好 #include <map> #include <cmath> #include <queue> #include &l ...

  7. 一个简单的django user.is_authenticated问题

    Q1:这是我一个view函数: def user_info(request): response=HttpResponse() user=request.user user_id=user.id if ...

  8. UVa1362 Exploring Pyramids

    区间dp,枚举走完第一个子树之后回到根节点的位置. /*by SilverN*/ #include<algorithm> #include<iostream> #include ...

  9. Z-Order(转)

    原文转自 http://www.th7.cn/system/win/201406/60715.shtml 窗口在子窗口链中的先后顺序也就是窗口在屏幕上显示时的前后顺序,在子窗口链里位置越靠前的窗口显示 ...

  10. 标准C程序设计七---70

    Linux应用             编程深入            语言编程 标准C程序设计七---经典C11程序设计    以下内容为阅读:    <标准C程序设计>(第7版) 作者 ...