Get the most out of your Centmin Mod LEMP stack
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,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    4:32 PM
    Nginx-1.26.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

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:32 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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,101
    428
    83
    May 31, 2014
    Ratings:
    +838
    Local Time:
    4:32 PM
    Nginx-1.26.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 ..... :(