feat(nginx): add hardened nginx app with security improvements
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
- Rate limiting (10 req/s per IP, burst 20) - Modern security headers (X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy) - Request body size limits (50m) - Fixed header inheritance bug in static files location block - Removed unused form fields (NGINX_INTERNAL_PORT, NGINX_ENABLE_ACCESS_LOG) - SSL handled by Runtipi reverse proxy Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
58
apps/nginx/metadata/description.md
Normal file
58
apps/nginx/metadata/description.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Nginx Custom
|
||||
|
||||
Serveur web **Nginx** avec configuration entièrement personnalisable via des volumes montés.
|
||||
|
||||
## Volumes disponibles
|
||||
|
||||
| Chemin dans le conteneur | Description |
|
||||
|--------------------------|-------------|
|
||||
| `/etc/nginx/nginx.conf` | Fichier de configuration principal |
|
||||
| `/etc/nginx/conf.d/` | Configurations des virtual hosts |
|
||||
| `/var/www/` | Contenu de vos sites web |
|
||||
| `/usr/share/nginx/html/` | Dossier html par défaut de Nginx |
|
||||
| `/var/log/nginx/` | Logs d'accès et d'erreur |
|
||||
| `/etc/nginx/ssl/` | Certificats SSL (lecture seule) |
|
||||
|
||||
## Utilisation
|
||||
|
||||
### Accéder aux fichiers
|
||||
|
||||
Les fichiers sont stockés dans le dossier `app-data` de votre installation Runtipi :
|
||||
|
||||
```
|
||||
runtipi/app-data/<app-store>/nginx-custom/
|
||||
├── conf.d/ # Vos configurations de sites
|
||||
│ └── default.conf
|
||||
├── nginx.conf # Config principale
|
||||
├── www/ # Vos fichiers web
|
||||
├── html/ # Dossier html par défaut
|
||||
├── logs/ # Logs nginx
|
||||
└── ssl/ # Certificats SSL
|
||||
```
|
||||
|
||||
### Ajouter un nouveau site
|
||||
|
||||
1. Créez un fichier `.conf` dans `conf.d/`
|
||||
2. Placez vos fichiers dans `www/monsite/`
|
||||
3. Redémarrez l'application depuis Runtipi
|
||||
|
||||
### Exemple de configuration
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name monsite.local;
|
||||
root /var/www/monsite;
|
||||
index index.html index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Les modifications de configuration nécessitent un redémarrage de l'app
|
||||
- Pour le SSL, placez vos certificats dans le dossier `ssl/`
|
||||
- Les logs sont persistés et accessibles dans `logs/`
|
||||
Reference in New Issue
Block a user