打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
you don't have permission to access /cacti on this server
配置 cacti出现该问题.
出现原因.是我在配置好cacti后重新安装了httpd.但这也应该不影响才对.但后来通过官网得知,可能是php的问题

Configure the Webserver (Apache)

If you are using Apache 1.3.x, installation of PHP 5 is not recommended.

Please find the file ”/etc/httpd/conf/httpd.conf” or equivalent and make sure it includes:

  # Load config files from the config directory "/etc/httpd/conf.d".  Include conf.d/*.conf

Now, please locate the PHP configuration file at ”/etc/httpd/conf.d/php.conf”

If using PHP 5, then make sure to have the following lines.

  # PHP is an HTML-embedded scripting language which attempts to make it  # easy for developers to write dynamically generated webpages.  LoadModule php5_module modules/libphp5.so  #  # Cause the PHP interpreter to handle files with a .php extension.  AddHandler php5-script .php  AddType text/html .php  #  # Add index.php to the list of files that will be served as directory  # indexes.  DirectoryIndex index.php

In case you do not install Cacti to the default web directory, put the following as cacti.conf into /etc/httpd/conf.d. Change /your/cacti/dir to your cacti directory name. Change the Allow from 127.0.0.1 directive to whatever you need (e.g. the subnets in your company). Follow the hints given in the comments, especially when using SELinux!

# Cacti - the complete rrdtool-based graphing solution# # Allows only localhost by default## Allowing cacti to anyone other than localhost should be considered# dangerous unless properly secured by SSL# Make sure, that httpd can read your cacti directories.# At minimum, you need#    chmod ugo+r -R /your/cacti/dir# Make sure to replace with your directories# When using SELinux, set the following:#    chcon -R -h -t httpd_sys_content_t /your/cacti/dir# when using SELinux and you private homedir, enable#    setsebool -P httpd_enable_homedirs 1#    setsebool -P httpd_read_user_content 1Alias /cacti /your/cacti/dir<Directory /your/cacti/dir>   AllowOverride None   Order Deny,Allow   Deny from all   Allow from 127.0.0.1   Allow from ::1   Options Indexes Includes FollowSymLinks</Directory># These directories do not require access over HTTP #<Directory /your/cacti/dir/cli>    Order Deny,Allow    Deny from All    Allow from None</Directory>

Make sure that the httpd web service is started as given by Start System Services for Cacti.

我重装了apache后发现conf.d目录下的确没有php.conf,原来好像也没有,难道重装apache后升级了????于是按上面的方法手动加了php.conf,仍然不行,后来重装了php可以了.
#yum install php 
重装了php后,该安装在/etc/httpd/conf.d目录下生成了一个php.conf.renew(因为我原来有一个php.conf)
备份原来的
#cp php.conf php.conf.bak
#mv php.conf.renew php.conf
#service httpd restart
后权限问题解决.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Apache 建立、修改虚拟目录和设置默认页面
wamp多站点多端口配置(转)
Apache下运行多实例Zend?Framework!好文章!!
apache配置虚拟主机及虚拟目录
遏制PHP木马攻击的秘笈
在Ubuntu Server上编译安装 Apache 2.2(with SSL) PHP 5.1.4 MYSQL 5.0.22
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服