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; alias /var/www/photos/photo21/static;
} }
error_page 503 /maintenance.html ; error_page 503 /static/maintenance.html ;
location /maintenance.html { location /maintenance.html {
try_files /var/www/photos/photo21/docs/maintenance.html =404; alias /var/www/photos/photo21/static ;
} }
location / { location / {

6
maintenance_tool.sh Normal file → Executable file
View file

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