d:id:sfujiwara:20100812:1281587030 の revise。 Nginxのifは条件節に&&(and)が使えない、ifのネストもできないので、複数の条件で判別したい場合は変数を使うといいよって感じです。 server { ... #error_page 500 502 503 504 /static/50x.html; ### maintenance error_page 500 502 504 /static/50x.html; set $go_maintenance "true"; if ($uri ~ "^/error/") { set $go_maintenance "false"; } if ($remote_addr ~ "^192\.0\.2\.") { set $go_maintenance "false"; } if ($remote_addr