Welcome to Centmin Mod Community
Register Now

Nginx help... wordpress 404 only for post

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by paddy, Nov 27, 2014.

  1. paddy

    paddy New Member

    27
    0
    1
    Nov 27, 2014
    Ratings:
    +0
    Local Time:
    6:19 PM
    1.7.7
    MariaDB 5.5
    hi , im finished build my vps with centminmod and instruction at WordPress + Super Cache plugin for Centmin Mod Nginx | wp1.centmincache.com
    and i got 404 on all my post only , but not for categories or archive.

    404 only exist when i add /%postname%.html on wordpress permalink.
    but if i use "Post name all went smooth.

    is there any config that i should add on my .conf or change ?

    here is my conf

    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    # listen 80;
    # server_name domain.com;
    # return 301 $scheme://www.domain.com$request_uri;
    # }

    server {
    server_name domain.com www.domain.com;

    # ngx_pagespeed & ngx_pagespeed handler
    include /usr/local/nginx/conf/pagespeed.conf;
    include /usr/local/nginx/conf/pagespeedhandler.conf;
    include /usr/local/nginx/conf/pagespeedstatslog.conf;

    # limit_conn limit_per_ip 16;
    # ssi on;

    access_log /home/nginx/domains/domain.com/log/access.log combined buffer=32k;
    error_log /home/nginx/domains/domain.com/log/error.log;
    root /home/nginx/domains/domain.com/public;
    include /usr/local/nginx/conf/wpsupercache.conf;

    location / {
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    # Enables directory listings when index file not found
    #autoindex on;
    # Shows file listing times as local time
    #autoindex_localtime on;
    # Enable for vBulletin usage WITHOUT vbSEO installed
    try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php;
    }
    include /usr/local/nginx/conf/wpsecure.conf;
    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/php.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    }

    thank you before ...
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,971
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,759
    Local Time:
    9:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  3. paddy

    paddy New Member

    27
    0
    1
    Nov 27, 2014
    Ratings:
    +0
    Local Time:
    6:19 PM
    1.7.7
    MariaDB 5.5
  4. paddy

    paddy New Member

    27
    0
    1
    Nov 27, 2014
    Ratings:
    +0
    Local Time:
    6:19 PM
    1.7.7
    MariaDB 5.5
    @eva2000 can i use xcache + zen opcache with ngx_pagespeed ? or only ngx_pagespeed ?
     
  5. eva2000

    eva2000 Administrator Staff Member

    28,971
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,759
    Local Time:
    9:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    xcache, apc cache, and zend opcache all do same task of php opcode caching so only one can be used - either xcache or zend opcache not both

    ngx_pagespeed doesn't use any php opcache cacher as it's an nginx module
     
  6. paddy

    paddy New Member

    27
    0
    1
    Nov 27, 2014
    Ratings:
    +0
    Local Time:
    6:19 PM
    1.7.7
    MariaDB 5.5
    ok thank u
     
  7. paddy

    paddy New Member

    27
    0
    1
    Nov 27, 2014
    Ratings:
    +0
    Local Time:
    6:19 PM
    1.7.7
    MariaDB 5.5
    @eva2000 can u tell me what's wrong with my conf , i got this error on supercache

    Screenshot by Lightshot

    and how to reinstall Zend OpCache

    [root@server centmin-v1.2.3mod]# PHP 5.4.33 (cli) (built: Nov 28 2014 04:41:28)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
    with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo
     
  8. eva2000

    eva2000 Administrator Staff Member

    28,971
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,759
    Local Time:
    9:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    how you manage that ? as Xcache and Zend Opcache install functions will automatically remove other php opcachers via menu options.

    Try running centmin.sh menu option 12 > sub menu option 2 to reinstall Zend Opcache it should remove the Xcache ini file

    Code:
    --------------------------------------------------------
    Centmin Mod 1.2.3-eva2000.08 - http://centminmod.com
    --------------------------------------------------------
                       Centmin Mod Menu                  
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB 5.2, 5.5, 10 Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install ioping.sh vbtechsupport.com/1239/
    14). SELinux disable
    15). Install/Re-install ImageMagick PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2,p7zip etc
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Re-install
    21). Update - Nginx + PHP-FPM + Siege
    22). Exit
    --------------------------------------------------------
    Enter option [ 1 - 22 ] 12
    --------------------------------------------------------
    
    Code:
    --------------------------------------------------------
            Zend OpCache Sub-Menu             
    --------------------------------------------------------
    1). Install Zend OpCache for PHP <5.5 or <5.6
    2). Reinstall Zend OpCache for PHP <5.5 or <5.6
    3). Back to Main menu
    --------------------------------------------------------
    Enter option [ 1 - 3 ] 2
    --------------------------------------------------------