29 lines
715 B
SQL
29 lines
715 B
SQL
-- Update advanced_config for proxy host 27 with maintenance mode
|
|
UPDATE proxy_host
|
|
SET advanced_config = '# Maintenance mode: Internet → maintenance page, INPI LAN → PROD
|
|
set $maintenance 0;
|
|
if ($remote_addr !~* ^10\.22\.68\.) {
|
|
set $maintenance 1;
|
|
}
|
|
if ($maintenance = 1) {
|
|
return 503;
|
|
}
|
|
|
|
# Custom error page for maintenance
|
|
error_page 503 /maintenance.html;
|
|
|
|
# Serve maintenance page
|
|
location = /maintenance.html {
|
|
root /data/nginx/html;
|
|
internal;
|
|
}
|
|
|
|
# www → non-www redirect
|
|
if ($host = ''www.nordabiznes.pl'') {
|
|
return 301 https://nordabiznes.pl$request_uri;
|
|
}
|
|
|
|
# HSTS Header
|
|
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;'
|
|
WHERE id = 27;
|