Chinaunix首页 | 论坛 | 博客
  • 博客访问: 145000
  • 博文数量: 29
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 368
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-17 18:06
个人简介

一个直来直去的人,被生活折磨的弯弯曲曲。

文章分类

全部博文(29)

文章存档

2019年(1)

2017年(1)

2014年(13)

2013年(14)

我的朋友

分类: 服务器与存储

2013-09-24 10:42:44

最近新裝的Nagios,localhost总是会报警告:“WARNING: HTTP/1.1 403 Forbidden ”


在此目录创建一个index.html文件: /var/www/html



1
touch /var/www/html/index.html

重启httpd和nagios服务,等待几分钟警告就自动清除了。

1
2
/etc/init.d/nagios restart
/etc/init.d/httpd restart



Wait for a few minutes the alert will be gone. Yes we are done here.

nagios-html-ok


nagios启动后,点击功能模块之间下载cgi

问题:不支持cgi


配置apache2.2.3支持CGI(备忘)
确定编译的时候安装上了CGI支持
路径/usr/local/apache2
vi /usr/local/apache2/conf/httpd.conf
找到Options Indexes FollowSymLinks
装相应的删掉。加入ExecCGI允许服务器执行CGI
(Options Includes ExecCGI FollowSymLinks)
找到#AddHandler cgi-script .cgi
前#去掉在后面加上 .pl
找到ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/在前面加上#
向下找到
    AllowOverride All
    Options IncludesNoExec ExecCGI FollowSymLinks
/usr/local/apache2/bin/apachectl restart
    Order allow,deny
    Allow from all
也可以让CGI程序在cgi-bin目录运行。
vi /usr/local/apache2/conf/extra/httpd-userdir.conf
变为同上面的一样也可加上相相应的参数
Options IncludesNoExec ExecCGI FollowSymLinks


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