Chinaunix首页 | 论坛 | 博客
  • 博客访问: 190149
  • 博文数量: 49
  • 博客积分: 1061
  • 博客等级: 少尉
  • 技术积分: 635
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-21 08:42
文章分类

全部博文(49)

文章存档

2015年(1)

2014年(2)

2013年(1)

2012年(45)

分类: 系统运维

2014-02-07 16:33:48


rsyslog + loganalyzer,部署文档网上一大把,不过,部署过后的Log Server,web访问是直接打开。基本上没有涉及到对web页面添加验证的文档。

config.php中有两种认证选项:UserDB和LDAP。

使用UserDB时,在config.php中加入这一行:
     $CFG['UserDBConvertAllowed'] = true;
config.php  :

点击(此处)折叠或打开

  1.      $CFG['UserDBEnabled'] = true;
         $CFG['UserDBServer'] = "localhost";
         $CFG['UserDBPort'] = 3306;
         $CFG['UserDBName'] = "phplogcon"; 
         $CFG['UserDBPref'] = "logcon_"; 
         $CFG['UserDBUser'] = "user";
         $CFG['UserDBPass'] = "password";
         $CFG['UserDBLoginRequired'] = false;
         $CFG['UserDBConvertAllowed'] = true;
然后访问
跟向导走下去即可。

最终效果是,访问 时,会有验证窗口。

结束后,务必屏蔽这一条,以免被别人覆盖你的UserDB。
#$CFG['UserDBConvertAllowed'] = true;

原文如下:

How to to use convert.php to install the Userdb-System in an existing LogAnalyzer installation

phpLogCon allows you to update your existing plain file based installation into a full LogAnalyzer installation including the UserDB-System feature. The UserDB-System allows you to fully control LogAnalyzer using an admin interface.

1. Locate the config.php in your LogAnalyzer directory, and open the file in your favourite editor.


2. Search for the text "UserDB options", and you will the begin of the UserDB related options. In order to enable the convert.php to work later, you have to set all options and verify them manually. Additionally you need to add a variable which allows the convert.php to work. This variable is another security check to avoid, that the convert.php is abused by third parties. So locate the UserDB options and change them to something like this:

     $CFG['UserDBEnabled'] = true;
     $CFG['UserDBServer'] = "localhost";
     $CFG['UserDBPort'] = 3306;
     $CFG['UserDBName'] = "phplogcon"; 
     $CFG['UserDBPref'] = "logcon_"; 
     $CFG['UserDBUser'] = "user";
     $CFG['UserDBPass'] = "password";
     $CFG['UserDBLoginRequired'] = false;
     $CFG['UserDBConvertAllowed'] = true;


3. Now access the convert.php using your webbrowser and follow the steps. If there is anything wrong with the UserDB access, you will a detailed error description.


4. When you finished the conversion, make sure to remove the line "$CFG['UserDBConvertAllowed'] = true;" from your config.php! Otherwise, others would be able to overwrite your UserDB!



阅读(2952) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~