Discover Centmin Mod today
Register Now

404 Not Found nginx on Wordpress

Discussion in 'Introductions' started by quach, Apr 9, 2015.

  1. quach

    quach New Member

    10
    0
    1
    Apr 9, 2015
    Ratings:
    +0
    Local Time:
    12:43 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.
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,839
    6,903
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,393
    Local Time:
    3:43 PM
    Nginx 1.13.x
    MariaDB 5.5
  3. eva2000

    eva2000 Administrator Staff Member

    30,839
    6,903
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,393
    Local Time:
    3:43 PM
    Nginx 1.13.x
    MariaDB 5.5
  4. quach

    quach New Member

    10
    0
    1
    Apr 9, 2015
    Ratings:
    +0
    Local Time:
    12:43 PM
    eva2000.07
    Thanks Admin,

    But in this case, how can i resolve error "404 NOT FOUND" ? Please help.

    Thanks.
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,839
    6,903
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,393
    Local Time:
    3:43 PM
    Nginx 1.13.x
    MariaDB 5.5