Get the most out of your Centmin Mod LEMP stack
Become a Member

Wordpress 404 Not Found nginx on Wordpress

Discussion in 'Blogs & CMS usage' started by quach, Apr 9, 2015.

  1. quach

    quach New Member

    10
    0
    1
    Apr 9, 2015
    Ratings:
    +0
    Local Time:
    5:15 PM
    eva2000.07
    Hi all,

    Please help me to resolve some error on my website.


    I setup Centmin mod and wordpress for my website. I correct file : mydomain.com.conf in location : /usr/local/nginx/conf/conf.d with content
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    #server {
    # listen 80;
    # server_name mydomain.com;
    # return 301 $scheme://www.mydomain.com$request_uri;
    # }

    server {
    server_name mydomain.com www.mydomain.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/mydomain.com/log/access.log combined buffer=32k;
    error_log /home/nginx/domains/mydomain.com/log/error.log;

    root /home/nginx/domains/mydomain.com/public;

    location / {
    try_files $uri $uri/ /index.php?$arg;
    }

    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;
    }

    My website use link (without .html) , like this : www.mydomain.com/123/support/

    But i get "404 not found" and I also can 't restart nginx, i get message error :

    [root@newvps ~]# service nginx restart
    nginx: [emerg] unknown "arg" variable
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed


    Please tell me the detail to fix this issue ASAP .Thanks a lot.
    ps : I use Wp Super Cache on my website. Please give me a recommend for best cache plugin.
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,337
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    8:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. quach

    quach New Member

    10
    0
    1
    Apr 9, 2015
    Ratings:
    +0
    Local Time:
    5:15 PM
    eva2000.07
    Thanks,

    Did you offer a service for install these module and fix these errors on VPS ( i dont see it on your website ) ? Because i'm a newbie , so that i'm afraid i will make more errors when i fix error 404 .
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,337
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    8:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod is provided as is. So short of bugs in the script itself, everything else for configuring your specific web apps is left up yo you to figure out. You're close, just need to follow instructions at WordPress + Super Cache plugin for Centmin Mod Nginx | wp1.centmincache.com and also to read Getting Started with Centmin Mod

    There's also Centmin Mod .08 beta 02 that added a wordpress auto installer Preview: Wordpress + WP Super Cache installer - centmin.sh option 22 | Centmin Mod Community but it's all beta so you need to be capable of keeping .08 beta updated with many changes i am making as well

    You could setup a 2nd test VPS with .08 beta 02 installed and run menu option 22, and then replicate the auto created nginx vhost for that domain.com.conf vhost file for your .07 stable server

    FYI, don't be afraid to make mistakes - setup a test VPS and make all the mistakes you need in order to learn :)
     
    Last edited: Apr 10, 2015
  5. quach

    quach New Member

    10
    0
    1
    Apr 9, 2015
    Ratings:
    +0
    Local Time:
    5:15 PM
    eva2000.07
    It's work now. Many thanks .
     
  6. quach

    quach New Member

    10
    0
    1
    Apr 9, 2015
    Ratings:
    +0
    Local Time:
    5:15 PM
    eva2000.07
    Hi,

    First domain, it 's work without error "404 not found". Now, i add the second domain to my server and I get this message " 404 not found". How can i resolve this issue ?

    Please help me. Thanks.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,337
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    8:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    did you edit 2nd domain.com.conf nginx vhost with wordpress specific settings ? do they match the 1st domain besides the domain name differences ?