您没有权限访问/在此服务器上 [英] You don't have permission to access / on this server

查看:484
本文介绍了您没有权限访问/在此服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的CentOS 6.1服务器,我在上面安装了Apache 2.2.15。
现在,当我尝试从另一台PC访问它(Windows 7)中的IE浏览器(HTTP:// /(的= CentOS的IP))我得到您没有权限访问/在这服务器。错误。我甚至创建phpinfo.php的文件,关于无功/ www / html等,当我尝试通过访问它的http的内容:在IE //*/phpinfo.php,我得到没有发现错误。我该怎么办?
我对directiry的httpd.conf是这样的:

 <目录的/ var / www / html等>
    选择了FollowSymLinks索引
    设置AllowOverride无
    为了允许,拒绝
    所有允许
< /目录>


解决方案

编辑httpd.conf文件,这是在 /etc/httpd/conf/httpd.conf中。添加低于code。

 <目录/>
#Options的FollowSymLinks
选择指数包括了FollowSymLinks ExecCGI
设置AllowOverride无
所有允许
< /目录><目录/家/>
 #Options的FollowSymLinks
 选择指数包括了FollowSymLinks ExecCGI
 设置AllowOverride无
 所有允许
< /目录>

该行后没有。 555(对我来说)。检查文件权限并重新启动服务器。

 服务的httpd重新启动

现在,它将工作。尽管如此,你都面临着同样的问题,禁用 SELINUX 的/ etc / SELinux的/配置变更 SELINUX =禁用并重新启动上述和尝试服务器。

希望这有助于

I have CentOS 6.1 server and I installed apache 2.2.15 on it. Now When I try to access it from another pc (windows 7) from IE (http:/// (=centos ip)) I get the "You don't have permission to access / on this server." error. I even created phpinfo.php file with content of "" on "var/www/html" and when I try to access it by using "http://*/phpinfo.php" in IE, I get not found error. What should I do? my httpd.conf for directiry is like this:

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

解决方案

Edit httpd.conf file, which is in /etc/httpd/conf/httpd.conf. Add the below code.

<Directory "/">
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride None
Allow from all
</Directory>

<Directory "/home/">
 #Options FollowSymLinks
 Options Indexes FollowSymLinks Includes ExecCGI
 AllowOverride None
 Allow from all
</Directory>

After the line no. 555 (in my case) . Check for the file permissions and restart the server.

service httpd restart   

Now, it will work . Still you are facing the same problem, disable the seLinux in /etc/selinux/config change SELINUX=disabled and restart the server as mentioned above and try it.

Hope this helps

这篇关于您没有权限访问/在此服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆