Unable to access ossec directory的解决

简介:

ossec安装完成后,打开web页面,菜单可以显示,不过没有内容,只有一个提示

 Unable to access ossec directory 

下面就说怎么搞定

导致这个问题的原因和解决方法如下

1,ossec文件夹所属是否是www或者apache(就是http服务的所有者)

2,tmp文件夹是否为777

3,ossec_conf.php 中$ossec_dir="/usr/local/ossec"; 这个是ossec安装的目录

4,如果执行2次或多次 ./setup.sh 修改用户密码或者修改配置,那么在 /etc/group中

ossec:x:500:apache 是否正确,添加2次的话,这里就是ossec:x:500:apacheapache,需要修改

5,setup.sh的配置

# ./setup.sh 
Setting up ossec ui...
   
Username: ossec                   #web登录的用户名
New password:                     #web登录密码
Re- type  new password: 
Adding password  for  user ossec
Enter your web server user name (e.g.apache, www, nobody, www-data, ...)
apache                           #web服务器所有者,一般为apache或者为www
Enter your OSSEC  install  directory path(e.g.  /var/ossec )
/usr/local/ossec                 #ossec的安装目录
You must restart your web server after thissetup is  done .
  
Setup completed successfuly

6,如果多次执行setup.sh,那么请把 .htpasswd 中内容删除,再执行一次,即再次生成密码,同时需要执行上述第4条

7,service ossec restart

8,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
vim /etc/httpd/conf.d/ossec.conf 
< Directory  /var/www/html/ossec>
#   Order deny,allow
#   Deny from all
#   Allow from 192.168.22.0/24
Options FollowSymLinks
     AllowOverride None
     Order deny,allow    
     allow from all  
Options -MultiViews
    AuthName "OSSEC AUTH"
    AuthType Basic
    AuthUserFile /var/www/html/ossec/.htpasswd
    Require valid-user
</ Directory >

# service httpd restart

9,查看web页面,此时应该会显示各个客户端










本文转自 bbotte 51CTO博客,原文链接:http://blog.51cto.com/bbotte/1586505,如需转载请自行联系原作者
目录
相关文章
|
1月前
|
安全 PHP
解决pcntl_fork() has been disabled for security reasons in file /www/wwwroot/192.168.21.2/vendor/wor
解决pcntl_fork() has been disabled for security reasons in file /www/wwwroot/192.168.21.2/vendor/wor
32 0
解决pcntl_fork() has been disabled for security reasons in file /www/wwwroot/192.168.21.2/vendor/wor
fatal error: X11/extensions/Xvlib.h/Xdbe.h: No such file or directory
fatal error: X11/extensions/Xvlib.h/Xdbe.h: No such file or directory
92 0
SVN:Unreadable path encountered; access denied
SVN:Unreadable path encountered; access denied
184 0
SVN:Unreadable path encountered; access denied
|
Unix Linux
Symantec Backup Exec 报"Access denied to directory xxx" Error Code E0008488
使用Symantec Backup Exec将几台Linux服务器上的RMAN备份收带时,偶尔会遇到作业备份失败的情况,检查Job History,就会发现有“Access denied to directory u05/backup/backupsets" 这类错误,当然实际路径为/u05/backup/backupsets.
2498 0