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:
@@ -23,15 +23,34 @@ cd img
|
|||||||
put -r $LOCAL_DIR/img/*
|
put -r $LOCAL_DIR/img/*
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Manual (HTML + Bilder)
|
# Manual (HTML + Bilder + PHP + Logs)
|
||||||
mkdir manual
|
mkdir manual
|
||||||
cd manual
|
cd manual
|
||||||
|
|
||||||
|
# statische HTML-Variante (Fallback / Direktaufrufe)
|
||||||
put -r $LOCAL_DIR/manual/index.html
|
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
|
put -r $LOCAL_DIR/manual/beacon-front.jpg
|
||||||
mkdir img
|
mkdir img
|
||||||
cd img
|
cd img
|
||||||
put -r $LOCAL_DIR/manual/img/*
|
put -r $LOCAL_DIR/manual/img/*
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
# Log-Verzeichnis für Zugriffsprotokolle
|
||||||
|
mkdir logs
|
||||||
|
cd logs
|
||||||
|
put -r $LOCAL_DIR/manual/logs/access.log
|
||||||
|
cd ..
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
bye
|
bye
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ RewriteRule ^ https://summitwave.eu%{REQUEST_URI} [L,R=301]
|
|||||||
# Canonicalize index.html to root
|
# Canonicalize index.html to root
|
||||||
RewriteRule ^index\.html$ https://summitwave.eu/ [L,R=301]
|
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)
|
# Cache static assets (adjust as needed)
|
||||||
<IfModule mod_expires.c>
|
<IfModule mod_expires.c>
|
||||||
ExpiresActive On
|
ExpiresActive On
|
||||||
|
|||||||
8
src/manual/.htaccess
Normal file
8
src/manual/.htaccess
Normal 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>
|
||||||
Reference in New Issue
Block a user