我刚刚把我的博客从本地服务器转移到亚马逊EC2免费Linux服务器上,现在一切似乎都正常了,除了固定链接,我禁用并重新启用了它们,但它仍然中断。
我试过运行这个脚本
sudo a2enmod rewrite
但它显示a2enmod:作为ec2-user登录到我的服务器时未找到命令
任何帮助都将不胜感激!
谢谢
发布于 2012-09-18 10:30:04
我刚刚遇到了同样的问题,假设您正在使用httpd,您将需要转到/etc/httpd/conf
,然后通过运行sudo vi httpd.conf
打开http.conf,然后将"AllowOverride“更改为:
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
您可能还需要在此处更改AllowOverride All
:
# 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 All
然后,您需要通过运行apachectl -k restart
来重新启动httpd。注意,您可能需要实际运行sudo apachectl -k restart
。
如果有帮助,请告诉我。
发布于 2014-01-14 14:39:58
对于Ubuntu,请在以下位置更改"AllowOverride All“:
“我必须采取的额外步骤是编辑/etc/apache2/sites enabled/000-default。
在该文件中,您将发现/var/www的AllowOverride设置为"None“。
将设置更改为: AllowOverride All“
感谢ljonas @ http://wordpress.org/support/topic/solved-permalinks-working-in-apache2-ubuntu-1010
发布于 2016-11-27 08:39:29
这里有书面和视频说明https://a1websitepro.com/enable-pretty-permalinks-amazon-web-hosting/
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
</Directory>
https://stackoverflow.com/questions/12292992
复制相似问题