url rewriting - WP permalink working, but why content doesn't display

I'm running a wp-blog on LEMP stack, I'm setting permalink fro WP Admin panel to say example.localblog%postn

I'm running a wp-blog on LEMP stack, I'm setting permalink fro WP Admin panel to say example.local/blog/%postname%

it shows full post name in the address bar, when I click any post, but it doesn't show any content.

here's the nginx conf file..

upstream example.local {
    server 127.0.0.1:8000 fail_timeout=30;
    keepalive 16;
}
map $http_upgrade $connection_upgrade {
    default upgrade;
    '' close;
}
server {
    listen 80;
    listen [::]:80;
    listen 443;
    ssl on;
    ssl_certificate /home/ssls/ssl-bundle-and-crt.crt;
    ssl_certificate_key /root/project1.key;
    server_name *.example.local example.local;  
    client_max_body_size 10M;

    gzip on;
    gzip_disable "msie6";

    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/javascript text/xml application/xml+rss;


    location ^~ /blog {
        #autoindex on;
        index index.php index.html index.htm index.nginx-debian.html;
            alias /var/www/html/wordpress;
        try_files $uri $uri/ /blog/index.php?$args;
            location ~ \.php$ {
                include fastcgi_params;
                        fastcgi_pass unix:/run/php/php7.1-fpm.sock;
                        fastcgi_param SCRIPT_FILENAME $request_filename;
            }
    }

    location / {
        proxy_pass ;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    proxy_read_timeout 300;
    }
    location ~ ^/static/(.*)$ {
        root /;
        try_files /root/project/project/staticfiles/$1 =404;
        expires 7d;
        add_header Pragma public;
        add_header Cache-Control "public";
    }
location /media {
    autoindex on;
    alias /root/project/project/media; 
}
    if ($scheme != "https") {
        return 301 https://$server_name$request_uri;
    }
}

As you can see, URL redirect rule is set properly under /blog location. but when I click the post, it only shows blog menu bar and nothing under, I mean no post-content

down below is .htaccess file

# BEGIN WordPress                                                                                                                                                 %
<IfModule mod_rewrite.c>                                                                                                                                          %
RewriteEngine On                                                                                                                                                  %
RewriteBase /                                                                                                                                                     %
RewriteRule ^index\.php$ - [L]                                                                                                                                    %
RewriteCond %{REQUEST_FILENAME} !-f                                                                                                                               %
RewriteCond %{REQUEST_FILENAME} !-d                                                                                                                               %
RewriteRule . /index.php [L]                                                                                                                                      %

I tried to disable .htaccess too, but still same

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745062299a4609037.html

相关推荐

  • url rewriting - WP permalink working, but why content doesn&#39;t display

    I'm running a wp-blog on LEMP stack, I'm setting permalink fro WP Admin panel to say example.localblog%postn

    17小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信