Learn about Centmin Mod LEMP Stack 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

    2,498
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    3:29 AM
    Nginx-1.13.x
    MariaDB 10.1.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

    28,987
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,767
    Local Time:
    10:29 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    2,498
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    3:29 AM
    Nginx-1.13.x
    MariaDB 10.1.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 ..... :(