Welcome to Centmin Mod Community
Register Now

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

    2,823
    253
    83
    May 31, 2014
    Ratings:
    +447
    Local Time:
    11:21 AM
    Nginx-1.13.x
    MariaDB 10.1.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

    30,961
    6,918
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,419
    Local Time:
    7:21 PM
    Nginx 1.13.x
    MariaDB 5.5
    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;
     
    • Informative Informative x 1
  3. pamamolf

    pamamolf Well-Known Member

    2,823
    253
    83
    May 31, 2014
    Ratings:
    +447
    Local Time:
    11:21 AM
    Nginx-1.13.x
    MariaDB 10.1.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

    30,961
    6,918
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,419
    Local Time:
    7:21 PM
    Nginx 1.13.x
    MariaDB 5.5
    not something i have plan for right now. So best to do the edit