Php NGINX:404用于永久链接

Php NGINX:404用于永久链接,php,wordpress,nginx,Php,Wordpress,Nginx,我已将我的NGINX配置为使用此规则 # WordPress single site 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_file

我已将我的NGINX配置为使用此规则

# WordPress single site 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;
}

# Uncomment one of the lines below for the appropriate caching plugin (if used).
#include global/wordpress-wp-super-cache.conf;
#include global/wordpress-w3-total-cache.conf;

# Pass all .php files onto a php-fpm/php-fcgi server.
location ~ [^/]\.php(/|$) {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        if (!-f $document_root$fastcgi_script_name) {
                return 404;
        }
    # This is a robust solution for path info security issue and works with "cgi.fix_pathinfo = 1" in /etc/php.ini (default)

        include fastcgi.conf;
        fastcgi_index index.php;
#   fastcgi_intercept_errors on;
#   fastcgi_pass phpcgi;
        fastcgi_pass unix:/var/www/web1/conf/sockets/nginx-php-fcgi.sock;
}
让permalinks使用NGINX。不幸的是,NGINX只显示起始页,没有问题-所有permalinks都返回404。日志文件显示:

2016/04/25 12:59:10 [error] 31336#0: *1 "/var/www/web1/htdocs/my-perma-link/index.php" is not found (2: No such file or directory), client: xx.xxx.xxx.xx, server: example.org, request: "GET /my-perma-link/ HTTP/1.1", host: "example.org"
已重新启动NGINX,但未成功