Want more timely Centmin Mod News Updates?
Become a Member

Nginx How can i exclude a domain/subdomain from maintenance mode?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Dec 5, 2017.

  1. pamamolf

    pamamolf Well-Known Member

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

    I am testing the maintenance mode on/off and i want to ask as i have on my server 2 domains and one subdomain if it is posible and how to exclude from this maintenance mode the one domain and the subdomain?

    Thank you

     
  2. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:37 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    just edit the nginx vhost for domain you want to exclude and comment out the maintenance related entries outlined only within nginx vhost at Beta Branch - sitestatus maintenance mode

    related to
    Code (Text):
    include /usr/local/nginx/conf/503include-main.conf;

    Code (Text):
    include /usr/local/nginx/conf/503include-only.conf;
     
  3. pamamolf

    pamamolf Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    10:37 AM
    Nginx-1.29.x
    MariaDB 10.6.x
    Can we have something like:

    So the user with that ip will be able to browse the site in maintenance mode.....

    As that will help to avoid the custom edit and it will be much faster :)
     
  4. eva2000

    eva2000 Administrator Staff Member

    58,894
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:37 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    not something i have plan for right now. So best to do the edit