Forbidden_You don't have permission to access /cacti/index.php on this server.

 用yum 安装 cacti,nagios
先是安装完cacti;用http://ip:port/cacti/index.php测试,正常;
然后继续安装nagios;安装完后用
http://ip:port/nagios测试,正常;
然后,继续跳会cacti的时候,竟然报错了:
Forbidden

You don't have permission to access /cacti/index.php on this server.
============================================

1102 yum install nagios nagios-nrpe nagios-plugins nagios-plugins-nrpe check_logfiles
1103 htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
1104 service httpd restart
1105 chkconfig --add nagios
1106 chkconfig nagios on
1107 service nagios start
1108 top
1109 restorecon –R /var/www/html/
1110 less /etc/selinux/config
1111 cd /var/www/html/
1116 cd cacti/
1117 ll ind*
1118 chmod 777 index.php
1119 ll ind*
1120 service nagios stop
1121 service httpd restart
1127 chown -Rv cacti:cacti cacti/
1129 cat /etc/group
1130 chown -Rv cacti:cacti cacti/
1136 cd /etc/httpd/conf
1138 vi httpd.conf
1139 service httpd restart
1140 service nagios start
1141 vi httpd.conf
1142 service httpd restart
1143 service httpd restart
1144 vi httpd.conf
1145 cd /var/www/
1148 chmod -Rv 777 html/
1149 chmod -Rv 777 cacti/
1156 cd /etc/httpd/conf
1157 vi httpd.conf
1158 service httpd restart
1159 vi httpd.conf
1163 cd conf.d/
1165 less cacti.conf
1166 cat nagios.conf
1167 ll
1168 less cacti.conf
1169 cd ../conf
1170 vi httpd.conf
1171 cd /var/www/
1175 cd /etc/httpd/conf.d/
1177 cp cacti.conf cacti.conf.save.bak
1179 vi cacti.conf
1180 service httpd restart
1181 vi cacti.conf
1182 service httpd restart
1183 cd /var/www/
1184 ll
1185 cd html/
1186 ll
1187 rm -f cacti/
1188 rm -f cacti
1189 ll
1190 cd ..
1191 ll
1192 cd html/
1193 ll
1194 ln -s ../cacti/ cacti
1195 ll
1196 rm cacti/
1197 rm cacti
1209 cp -rv ../cacti/ .
1211 chown -rv cacti:cacti cacti/
1212 chown -Rv cacti:cacti cacti/
1214 usermod -a -G cacti apache
1215 cd /tmp/
1217 cd /var/www/
1219 chown -R apache:apache /var/www/html
1220 ll
1221 cd /etc/httpd/conf.d/
1222 ll
1223 vi cacti.conf
1224 service httpd restart
1225 vi cacti.conf
1226 service httpd restart
1227 pwd
1228 ll
1229 vi /etc/httpd/conf.d/cacti.conf
1230 ll
1231 cd /var/www/
1232 ll
1233 cd html/
1234 ll
1235 cat /etc/group
1236 history
=========================

 先后安装的,都可用;
返回去就不行了;
之前编译安装过一次这2个;这次想简便些;
我修改了:
# vi /etctpd/conf.d/cacti.conf
添加了allow from all
然后
service httpd restart
然后就可用了;奇怪;
================
参考地址:

3、配置

Apache

说明:默认cacti目录只允许本机127.0.0.1访问,如果不设置将会出现You don't have permission to access /cacti/ on this server.

vi /etc/httpd/conf.d/cacti.conf

Alias /cacti    /usr/share/cacti

<Directory /usr/share/cacti/>

        Order Deny,Allow

        Deny from all

        Allow from 127.0.0.1

        Allow from 192.168.1.88         

</Directory>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值