Nginx debug and mantenance mode working

This commit is contained in:
root 2025-11-27 10:07:35 +01:00
parent a4cdcd4039
commit 464c319c1e
2 changed files with 5 additions and 5 deletions

View file

@ -55,10 +55,10 @@ server {
alias /var/www/photos/photo21/static;
}
error_page 503 /maintenance.html ;
error_page 503 /static/maintenance.html ;
location /maintenance.html {
try_files /var/www/photos/photo21/docs/maintenance.html =404;
alias /var/www/photos/photo21/static ;
}
location / {

6
maintenance_tool.sh Normal file → Executable file
View file

@ -8,8 +8,8 @@
# --- CONFIGURATION ---
# IMPORTANT: Change this path to the root directory of your website.
# The script MUST have write permissions to this directory.
SITE_ROOT="/var/www/photos/photo21/"
FLAG_FILE="$SITE_ROOTdocs/maintenance.flag"
SITE_ROOT="/var/www/photos/photo21"
FLAG_FILE="$SITE_ROOT/docs/maintenance.flag"
# ---------------------
# Function to display current status
@ -66,4 +66,4 @@ toggle_mode
echo "================================================="
echo "Script finished."
echo "================================================="
echo "================================================="