Caddyfile Einstellungen zu README.md hinzu
This commit is contained in:
@@ -64,6 +64,43 @@ Bei jedem Downloadversuch wird der Downloadzähler *downloads* um 1 erhöht. Wir
|
||||
|
||||
## Einstellungen Caddy Webserver {#Caddy-Config}
|
||||
|
||||
```
|
||||
tresor.example.com {
|
||||
#PHP
|
||||
php_fastcgi unix//run/php/php-fpm.sock
|
||||
|
||||
# Root directory
|
||||
root * /Pfad/Zu/DigiErbe/Tresor/public
|
||||
|
||||
# Authentication
|
||||
basic_auth / {
|
||||
username $2a$14$SetHashedPasswordHere
|
||||
}
|
||||
|
||||
# Activate file server in Caddy
|
||||
file_server
|
||||
|
||||
# Redirect all requests to index.php
|
||||
try_files {path} /index.php
|
||||
|
||||
# Security headers
|
||||
header {
|
||||
-Server
|
||||
X-Content-Type-Options "nosniff"
|
||||
X-Frame-Options "DENY"
|
||||
X-XSS-Protection "1; mode=block"
|
||||
}
|
||||
|
||||
# Add authenticated username as HTTP Header to the request
|
||||
header_down +X-WEBAUTH-USER {http.auth.user.id}
|
||||
|
||||
# Protokoll
|
||||
log {
|
||||
output file /var/log/caddy/DigiErbe/tresor.log
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Benutzer anlegen {#addUser}
|
||||
|
||||
### Konfiguration neu einlesen {#Caddy-Reload}
|
||||
|
||||
Reference in New Issue
Block a user