Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Nginx returns a 503 page when maintenance.on exists. The deploy script automatically enables/disables maintenance mode around the update. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
71 lines
1.6 KiB
Nginx Configuration File
71 lines
1.6 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
# Maintenance mode
|
|
if (-f /var/www/html/maintenance.on) {
|
|
return 503;
|
|
}
|
|
|
|
error_page 503 @maintenance;
|
|
|
|
location @maintenance {
|
|
root /var/www/html/public;
|
|
rewrite ^(.*)$ /maintenance.html break;
|
|
}
|
|
|
|
location = /maintenance.html {
|
|
root /var/www/html/public;
|
|
internal;
|
|
}
|
|
|
|
root /var/www/html/frontend/.output/public;
|
|
index index.html;
|
|
|
|
client_max_body_size 55m;
|
|
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr;
|
|
|
|
location ^~ /api/ {
|
|
root /var/www/html/public;
|
|
try_files $uri /index.php?$query_string;
|
|
}
|
|
|
|
location ^~ /bundles/ {
|
|
root /var/www/html/public;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location = /api/login_check {
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME /var/www/html/public/index.php;
|
|
fastcgi_param DOCUMENT_ROOT /var/www/html/public;
|
|
fastcgi_param SCRIPT_NAME /index.php;
|
|
fastcgi_param PATH_INFO /login_check;
|
|
fastcgi_param REQUEST_URI /login_check;
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
}
|
|
|
|
location ^~ /_mcp {
|
|
root /var/www/html/public;
|
|
try_files $uri /index.php?$query_string;
|
|
}
|
|
|
|
location ~ ^/index\.php(/|$) {
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME /var/www/html/public/index.php;
|
|
fastcgi_param DOCUMENT_ROOT /var/www/html/public;
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
internal;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
return 404;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|