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.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 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.com/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/  
            location ~ .php$ {
                include fastcgi_params;
                        fastcgi_pass unix:/run/php/php7.1-fpm.sock;
                        fastcgi_param SCRIPT_FILENAME $request_filename;

    location / {
        proxy_pass http://example.local;
        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

, , user177175 4 years 2019-10-22T04:08:59-05:00 0 Answers 79 views 0

Leave an answer