首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Wordpress permalink不工作于aws

Wordpress permalink不工作于aws
EN

Stack Overflow用户
提问于 2015-02-26 12:44:40
回答 2查看 2.9K关注 0票数 3

我花了4-5个小时来解决这个问题,但没能解决。

我已经在AWS.Everything上设置了我的wordpress网站,除了wordpress的permalinks外,它是工作文件。

当permalinks设置为默认时,页面/帖子正在工作,但不使用“%post名称%”。

我在谷歌上搜索了几乎所有的东西,但都没有成功。

我看到了很多与 httpd.conf 文件相关的解决方案,但是在我的根目录中没有文件httpd.conf,也没有http目录。

我在apache.conf文件中更改了以下代码,但仍然无法工作

代码语言:javascript
复制
<Directory />
    Options FollowSymLinks
    AllowOverride All
    Require all denied
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

一次又一次地重新启动apache,但是没有运气。

请帮帮我伙计们。

谢谢。

EN

回答 2

Stack Overflow用户

发布于 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">开头的部分

代码语言:javascript
复制
<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行;请确保您更改了该部分中的行。

代码语言:javascript
复制
AllowOverride All

(3)重新启动Apache服务

票数 5
EN

Stack Overflow用户

发布于 2015-02-26 14:16:47

如果您没有多少使用aws的经验,那么我想这是因为您没有向apache授予足够的权限。如果您不知道如何向apache授予权限,则可以在控制台中使用此命令。

代码语言:javascript
复制
sudo CHOWN -R apache:apache /var/www/html

完成后,尝试转到“设置”页面并保存新设置。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28742845

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档