apache 403禁止错误应该工作但不能

时间:2013-12-25 05:22:30

标签: apache

这是我第一次使用apache服务器,我试图找到答案但最后失败了,有人可以帮忙解决这个问题吗?以下是可能受影响的信息。

输入http:// [hostname] /index.php

时出现

错误消息

Forbidden

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

Apache/2.2.15 (Red Hat) Server at [hostname] Port 80

操作系统信息:

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)

httpd.conf信息 $ cat /etc/httpd/conf/httpd.conf(http.conf的一部分)

User apache
Group apache
ServerAdmin root@localhost

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/var/www/html">

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

<IfModule mod_userdir.c>
    UserDir disabled
</IfModule>

DirectoryIndex index.php index.html.var index.html index.htm

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Allow from all
    Satisfy All
</Files>

<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off

Alias /icons/ "/var/www/icons/"

<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>

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

<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>


Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>
</IfModule>
</IfModule>

的.htaccess

$ cat .htaccess
DirectoryIndex index.php

selinux的配置:

sudo cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.

#SELINUX=enforcing
SELINUX=disabled

# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

0 个答案:

没有答案