diff --git a/deploy_to_hetzner.sh b/deploy_to_hetzner.sh index 745f497..6dc0113 100755 --- a/deploy_to_hetzner.sh +++ b/deploy_to_hetzner.sh @@ -23,15 +23,34 @@ cd img put -r $LOCAL_DIR/img/* cd .. -# Manual (HTML + Bilder) +# Manual (HTML + Bilder + PHP + Logs) mkdir manual cd manual + +# statische HTML-Variante (Fallback / Direktaufrufe) put -r $LOCAL_DIR/manual/index.html + +# PHP-basierte Manual-/Login-Dateien +put -r $LOCAL_DIR/manual/.htaccess +put -r $LOCAL_DIR/manual/index.php +put -r $LOCAL_DIR/manual/login.php +put -r $LOCAL_DIR/manual/auth.config.php +put -r $LOCAL_DIR/manual/auth.php +put -r $LOCAL_DIR/manual/logout.php + +# Manual-Bilder put -r $LOCAL_DIR/manual/beacon-front.jpg mkdir img cd img put -r $LOCAL_DIR/manual/img/* cd .. + +# Log-Verzeichnis für Zugriffsprotokolle +mkdir logs +cd logs +put -r $LOCAL_DIR/manual/logs/access.log +cd .. + cd .. bye EOF diff --git a/src/.htaccess b/src/.htaccess index 806bf61..74c780c 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -12,6 +12,9 @@ RewriteRule ^ https://summitwave.eu%{REQUEST_URI} [L,R=301] # Canonicalize index.html to root RewriteRule ^index\.html$ https://summitwave.eu/ [L,R=301] +# Ensure /manual/ uses PHP (login-guarded) +RewriteRule ^manual/?$ /manual/index.php [L] + # Cache static assets (adjust as needed) ExpiresActive On diff --git a/src/manual/.htaccess b/src/manual/.htaccess new file mode 100644 index 0000000..dad6ba1 --- /dev/null +++ b/src/manual/.htaccess @@ -0,0 +1,8 @@ +# Ensure PHP index is used in /manual/ +DirectoryIndex index.php + + + RewriteEngine On + # Redirect direct hits of index.html to index.php (login-guarded) + RewriteRule ^index\.html$ index.php [L,R=302] +