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
1103htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
1104service httpd restart
1105chkconfig --add nagios
1106chkconfig nagios on
1107service nagios start
1108top
1109restorecon –R /var/www/html/
1110less /etc/selinux/config
1111cd /var/www/html/
1116cd cacti/
1117ll ind*
1118chmod 777 index.php
1119ll ind*
1120service nagios stop
1121service httpd restart
1127chown -Rv cacti:cacti cacti/
1129cat /etc/group
1130chown -Rv cacti:cacti cacti/
1136cd /etc/httpd/conf
1138vi httpd.conf
1139service httpd restart
1140service nagios start
1141vi httpd.conf
1142service httpd restart
1143service httpd restart
1144vi httpd.conf
1145cd /var/www/
1148chmod -Rv 777 html/
1149chmod -Rv 777 cacti/
1156cd /etc/httpd/conf
1157vi httpd.conf
1158service httpd restart
1159vi httpd.conf
1163cd conf.d/
1165less cacti.conf
1166cat nagios.conf
1167ll
1168less cacti.conf
1169cd ../conf
1170vi httpd.conf
1171cd /var/www/
1175cd /etc/httpd/conf.d/
1177cp cacti.confcacti.conf.save.bak
1179vi cacti.conf
1180service httpd restart
1181vi cacti.conf
1182service httpd restart
1183cd /var/www/
1184ll
1185cd html/
1186ll
1187rm -f cacti/
1188rm -f cacti
1189ll
1190cd ..
1191ll
1192cd html/
1193ll
1194ln -s ../cacti/cacti
1195ll
1196rm cacti/
1197rm cacti
1209cp -rv ../cacti/ .
1211chown -rv cacti:cacti cacti/
1212chown -Rv cacti:cacti cacti/
1214usermod -a -G cacti apache
1215cd /tmp/
1217cd /var/www/
1219chown -R apache:apache /var/www/html
1220ll
1221cd /etc/httpd/conf.d/
1222ll
1223vi cacti.conf
1224service httpd restart
1225vi cacti.conf
1226service httpd restart
1227pwd
1228ll
1229vi /etc/httpd/conf.d/cacti.conf
1230ll
1231cd /var/www/
1232ll
1233cd html/
1234ll
1235cat /etc/group
1236history
=========================
先后安装的,都可用;
返回去就不行了;
之前编译安装过一次这2个;这次想简便些;
我修改了:
# vi /etchttp://onexin.iyunv.com/source/plugin/onexin_bigdata/file:///C:UserswangqzAppDataLocalTemp@IR3P(8S$C$Z$TY~5I{QEPC.giftpd/conf.d/cacti.conf
添加了allow from all
然后
service httpd restart
然后就可用了;奇怪;
================
参考地址:
http://hi.baidu.com/monobao/blog/item/aa7c4adf8bab3b1749540397.html
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>
页:
[1]