为什么看不到localhost的apache欢迎页面?

时间:2019-10-23 16:38:26

标签: apache centos

我在CentOS上安装了Apache。当我用IP地址或本地主机访问浏览器时。我收到403错误的不受欢迎页面。

但是,如果我将[b] index.html [/ b]放在[quote] [b] / var / www / html / [/ b] [/ quote]下,则可以看到索引内容。为什么不先不访问欢迎页面?

welcome.conf

<LocationMatch "^/+$">
     Options +Indexes
     ErrorDocument 403 /.noindex.html
</LocaltionMatch>

<Directory /usr/share/httpd/noindex>
        AllowOverride None
        Require all granted
</Directory>

/etc/httpd/conf/conf/httpd.conf

ServerRoot "/etc/httpd"

Listen 80
Listen 443

user apache
Group apache

ServerAdmin root@localhost

<Directory />
    AllowOverride None
    Require all denied
</Directory>

DocumentRoot "/var/www/html"
<Directory "/var/www">
   AllowOverride None
  #Allow open access:
  Require all granted
</Directory>

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

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

0 个答案:

没有答案