安装wordpress后显示index of/wordpress,或者Forbidden You dont't have permission

来源:互联网 发布:网络音乐播放器hifi 编辑:程序博客网 时间:2024/06/06 00:01

安装好apache2.4+php7+mysql5.7后,一切测试正常。

然后安装wordpress,链接数据库,注册并成功登陆后,显示:

这里写图片描述

1.将wordpress中的.htaccess文件修改为:

DirectoryIndex index.php index.html# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule># END WordPress

2.在apache的配置文件httpd.conf中,将全部

AllowOverride None 

修改为:

AllowOverride All

3.restart apache

显示:
这里写图片描述

1.在apache的配置文件httpd.conf中,将全部

Require all denied 

修改为:

Require all granted

2.restart apache

阅读全文
0 0
原创粉丝点击