我花了4-5个小时来解决这个问题,但没能解决。
我已经在AWS.Everything上设置了我的wordpress网站,除了wordpress的permalinks外,它是工作文件。
当permalinks设置为默认时,页面/帖子正在工作,但不使用“%post名称%”。
我在谷歌上搜索了几乎所有的东西,但都没有成功。
我看到了很多与 httpd.conf 文件相关的解决方案,但是在我的根目录中没有文件httpd.conf,也没有http目录。
我在apache.conf文件中更改了以下代码,但仍然无法工作
<Directory />
Options FollowSymLinks
AllowOverride All
Require all denied
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>一次又一次地重新启动apache,但是没有运气。
请帮帮我伙计们。
谢谢。
发布于 2016-11-09 06:37:05
我刚刚修复了这个错误。确保在进行httpd.conf更改后重新启动Apache服务!
这里的文档提供了一个清单,列出了让wordpress在AWS上工作所需的所有更改--包括获得正确的权限:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html
您需要修复permalinks的部分是tp 更新httpd.conf文件。
(1)位置: /etc/httpd/conf/httpd.conf
(2)查找以 <Directory "/var/www/html">开头的部分
<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
更改上述部分中的AllowOverride None行,以读取AllowOverride All
备注该文件中有多个AllowOverride行;请确保您更改了该部分中的行。
AllowOverride All(3)重新启动Apache服务
发布于 2015-02-26 14:16:47
如果您没有多少使用aws的经验,那么我想这是因为您没有向apache授予足够的权限。如果您不知道如何向apache授予权限,则可以在控制台中使用此命令。
sudo CHOWN -R apache:apache /var/www/html完成后,尝试转到“设置”页面并保存新设置。
https://stackoverflow.com/questions/28742845
复制相似问题