Join the community today
Become a Member

Centminmod beta latest version 404 issue and fix for it

Discussion in 'Install & Upgrades or Pre-Install Questions' started by pamamolf, Mar 2, 2016.

  1. pamamolf

    pamamolf Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    10:45 AM
    Nginx-1.29.x
    MariaDB 10.6.x
    Hi

    On a new dedicated server when i add a new vhost and transfer files on public folder i am getting 404 not found always :(

    Then i have to comment out on the new created domain vhost file this:


    Code:
    #include /usr/local/nginx/conf/503include-main.conf;
    content of it:

    Code:
        # only uncomment if you do not need to exclude images or js
        # from 503 redirect rewrites
         #include /usr/local/nginx/conf/503include-only.conf;
         error_page 503 @maintenance;
         location @maintenance {
              #if ($maintenance = 1) {
              rewrite ^ /maintenance.html break;
              #ry_files /maintenance.html =503;
              #}
         }
    Restart nginx and all working great :)
     
    Last edited: Mar 2, 2016
  2. eva2000

    eva2000 Administrator Staff Member

    58,907
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:45 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    That probably isn't the underlying problem. It's probably related to php-fpm service going down at 502 bad gateway errors | Centmin Mod Community When it's down your site is unavailable = 503 so triggers this 503 maintenance mode which redirects to maintenance.html.

    Do you have a maintenance.html file in your web root /public directory ? If not, then you'd get 404 error

    Do you have errorpage.conf include file in your vhost enabled/uncommented ?
    Code:
    include /usr/local/nginx/conf/errorpage.conf;
     
  3. pamamolf

    pamamolf Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    10:45 AM
    Nginx-1.29.x
    MariaDB 10.6.x
    No

    No it's not uncommented...

    But in any case there is no reason to display an error 404 or 502 with server load 0,5 ..... :(