Welcome to Centmin Mod Community
Become a Member

Wordpress Wordpress + fastcgi feed 404

Discussion in 'Blogs & CMS usage' started by xenbiarritz, Jun 7, 2017.

  1. xenbiarritz

    xenbiarritz New Member

    8
    1
    3
    May 7, 2017
    Ratings:
    +1
    Local Time:
    12:27 AM
    hi,

    i set a wordpress site using your guide
    https://centminmod.com/nginx_configure_wordpress.html#fastcgicache

    when fastcgi is enable, i have a 404 for /feed/

    strange ?

    Code:
    if ($request_uri ~* "/\?add-to-cart=|cart/|my-account/|checkout/|shop/checkout/|store/checkout/|customer-dashboard/|addons/|(memcache\.php|apc\.php|wp-admin/.*|xmlrpc\.php|wp-(app|cron|login|register|mail)\.php|wp-.*\.php|feed/|index\.php|wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php|sitemap(_index)?\.xml|[a-z0-9_-]+-sitemap([0-9]+)?\.xml)") {
            set $no_cache 1;
    }
    does not help?

    thank you for your help

    ps when fastcgi is off /feed/ works perfectly
     
  2. eva2000

    eva2000 Administrator Staff Member

    31,019
    6,923
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,429
    Local Time:
    9:27 AM
    Nginx 1.13.x
    MariaDB 5.5
    strange - one of reasons why i don't recommend fastcgi_cache as some remaining issues.

    what does your wordpres nginx vhost contents look like right now ?
     
  3. xenbiarritz

    xenbiarritz New Member

    8
    1
    3
    May 7, 2017
    Ratings:
    +1
    Local Time:
    12:27 AM
    hi @eva2000
    thank you

    here is my vhost
    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    # For SPDY SSL Setup
    # read http://centminmod.com/nginx_configure_https_ssl_spdy.html
    
    # redirect from www to non-www  forced SSL
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    # server {
    #   server_name mywebsite.com www.mywebsite.com;
    #    return 302 https://$server_name$request_uri;
    # }
    
    server {
      listen 178.30.98.216:443 ssl http2;
      server_name mywebsite.com www.mywebsite.com;
          if ($host = 'mywebsite.com' ) {
             return 301 https://www.mywebsite.com$request_uri;
    
          }
      include /usr/local/nginx/conf/ssl/mywebsite.com/mywebsite.com.crt.key.conf;
      include /usr/local/nginx/conf/ssl_include.conf;
    
      http2_max_field_size 16k;
      http2_max_header_size 32k;
      # mozilla recommended
      ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+ECDSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+SHA384:EECDH+AES128:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA;
      ssl_prefer_server_ciphers   on;
      #add_header Alternate-Protocol  443:npn-spdy/3;
    
      # before enabling HSTS line below read centminmod.com/nginx_domain_dns_setup.html#hsts
      add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
      #add_header X-Frame-Options SAMEORIGIN;
      #add_header X-Xss-Protection "1; mode=block" always;
      #add_header X-Content-Type-Options "nosniff" always;
      #spdy_headers_comp 5;
      ssl_buffer_size 1369;
      ssl_session_tickets on;
     
      # enable ocsp stapling
      resolver 8.8.8.8 8.8.4.4 valid=10m;
      resolver_timeout 10s;
      ssl_stapling on;
      ssl_stapling_verify on;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeedplaisir.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      #add_header X-Frame-Options SAMEORIGIN;
      #add_header X-Xss-Protection "1; mode=block" always;
      #add_header X-Content-Type-Options "nosniff" always;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/mywebsite.com/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/mywebsite.com/log/error.log;
    
      include /usr/local/nginx/conf/autoprotect/mywebsite.com/autoprotect-mywebsite.com.conf;
      root /home/nginx/domains/mywebsite.com/public;
    
      # uncomment cloudflare.conf include if using cloudflare for
      # server and/or vhost site
      #include /usr/local/nginx/conf/cloudflare.conf;
      include /usr/local/nginx/conf/503include-main.conf;
    
      #include /usr/local/nginx/conf/wpincludes/mywebsite.com/wpcacheenabler_mywebsite.com.conf;
      #include /usr/local/nginx/conf/wpincludes/mywebsite.com/wpsupercache_mywebsite.com.conf;
      # https://community.centminmod.com/posts/18828/
      #include /usr/local/nginx/conf/wpincludes/mywebsite.com/rediscache_mywebsite.com.conf;
    
      location / {
    include /usr/local/nginx/conf/503include-only.conf;
    
    include /usr/local/nginx/conf/wpsecure.conf;
    include /usr/local/nginx/conf/wpcache.conf;
    include /usr/local/nginx/conf/phpwpcache.conf;
    #include /usr/local/nginx/conf/php.conf;
         #auth_basic "Private";
         #auth_basic_user_file /usr/local/nginx/conf/htpasswd_admin_php;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # for wp cache enabler plugin
      #try_files $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args;
    
      # Wordpress Permalinks
      try_files $uri $uri/ /index.php?q=$uri&$args;
    
      # Nginx level redis Wordpress
      # https://community.centminmod.com/posts/18828/
      #try_files $uri $uri/ /index.php?$args;
    
      }
    
    location ~* /(wp-login\.php) {
        limit_req zone=xwplogin burst=1 nodelay;
        #limit_conn xwpconlimit 30;
        auth_basic "Private";
        auth_basic_user_file /home/nginx/domains/mywebsite.com/htpasswd_wplogin;  
     
        include /usr/local/nginx/conf/php-wpsc.conf;
    }
    
    location ~* /(xmlrpc\.php) {
        limit_req zone=xwplogin burst=2 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
    }
    
      include /usr/local/nginx/conf/wpincludes/mywebsite.com/wpsecure_mywebsite.com.conf;
    
      include /usr/local/nginx/conf/php-wpsc.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    31,019
    6,923
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,429
    Local Time:
    9:27 AM
    Nginx 1.13.x
    MariaDB 5.5
    what happens if you replace each instance of
    Code (Text):
    include /usr/local/nginx/conf/php-wpsc.conf;
    

    with
    Code (Text):
    # include /usr/local/nginx/conf/php-wpsc.conf;
    include /usr/local/nginx/conf/phpwpcache.conf