为了让我的WordPress站点在Nginx的辅助VPS上运行,我已经工作了几个小时。主页已加载,W3T缓存工作正常,但永久链接仍然损坏,每一个都会导致404:
404 Not Found
nginx/0.8.53
在错误中。我找到的日志
2012/12/22 01:06:16 [error] 16865#0: *2 "/home/user/domain.com/web-development/pdf2html-for-cforms/index.html" is not found (2: No such file or directory), client: 125.25.32.95, server: www.domain.com, request: "GET /web-development/pdf2html-for-cforms/ HTTP/1.1", host: "www.domain.com", referrer: "http://www.domain.com/"
So索引。似乎每个永久链接仍在寻找html。。
以下是我在/主页/用户/域中拥有的内容。com/wordpress。形态
# WordPress single blog rules.
# Designed to be included in any server {} block.
# This order might seem weird - this is attempted to match last if rules below fail.
# http://wiki.nginx.org/HttpCoreModule
location / {
try_files $
uri $uri/ /index.php?$args;
}
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
# Directives to send expires headers and turn off 404 error logging.
location ~* ^.+\\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off; log_not_found off; expires max;
}
这是我从WordPress抄本上得到的。我想运行Nginx Helper,它应该可以帮助解决Nginx上的WordPress permalink问题,但我有PHP 5.2和5.3,所以我不能,也不想编译一个新的PHP,因为这还不是我的专业领域。
有人知道我如何解决这个问题并获得我的自定义permalink结构吗/%category%/%postname%/
正常运转
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
仍然是索引。已添加html。以及带有索引的url。当然找不到html。最新错误:
2012/12/22 05:35:54 [error] 28148#0: *64 "/home/user/domain.com/web-development/dreamhost-vps-manager-forced-reboot-issues/index.html" is not found (2: No such file or directory), client: 125.25.32.95, server: www.domain.com, request: "GET /web-development/dreamhost-vps-manager-forced-reboot-issues/ HTTP/1.1", host: "www.domain.com", referrer: "http://www.domain.com/"
使您怀疑配置文件是否已加载。如何检查此项?