feat: add PHP-based authentication system for manual with access logging

- Add login.php, auth.php, and auth.config.php for manual access control
- Create logout.php for session management
- Add .htaccess to route /manual/ requests to PHP-based index
- Create logs directory and access.log for tracking manual visits
- Update deployment script to upload PHP authentication files and logs
- Add rewrite rule to ensure /manual/ uses login-guarded PHP version
- Keep static index.html as fallback for direct
This commit is contained in:
2025-12-15 17:25:32 +01:00
parent dc7dcdd650
commit 4e61cf2189
3 changed files with 31 additions and 1 deletions

View File

@@ -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

View File

@@ -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)
<IfModule mod_expires.c>
ExpiresActive On

8
src/manual/.htaccess Normal file
View File

@@ -0,0 +1,8 @@
# Ensure PHP index is used in /manual/
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect direct hits of index.html to index.php (login-guarded)
RewriteRule ^index\.html$ index.php [L,R=302]
</IfModule>