Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:web-01 [18/09/2025 00:13] – [Castopod] LibertAdmin | tech:web-01 [14/10/2025 08:15] (Version actuelle) – [Liberta (Site principal)] LibertAdmin | ||
|---|---|---|---|
| Ligne 1300: | Ligne 1300: | ||
| </ | </ | ||
| + | Nous avons créé le fichier commun ''/ | ||
| + | Le fichier est agrémenté de directives de sécurité recommandées pour la plupart des applications (certaines modifient ces directives via leur propre configuration évidemment) : | ||
| - | === CryptPad === | + | <code bash> |
| - | === Etherpad-Lite === | + | # cat / |
| - | === Funkwhale === | + | # Security headers |
| - | === Nextcloud === | + | add_header X-XSS-Protection |
| - | === Peertube === | + | add_header X-Content-Type-Options |
| - | === WriteFreely === | + | add_header Referrer-Policy |
| + | add_header Content-Security-Policy | ||
| + | add_header Permissions-Policy | ||
| + | add_header Strict-Transport-Security " | ||
| + | |||
| + | # Dotfiles | ||
| + | location ~ / | ||
| + | deny all; | ||
| + | } | ||
| + | |||
| + | # ACME-challenge | ||
| + | location ^~ / | ||
| + | root / | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | === Liberta (Site principal)=== | ||
| + | |||
| + | Le site de Liberta est en pur HTML et CSS. Il **était**, il est passé sur [[https:// | ||
| + | |||
| + | Ce fichier contient la gestion globale du HTTP, lequel redirige tous les domaines vers HTTPS, notamment le site de Liberta qui est sur le sous-domaine '' | ||
| + | |||
| + | Nous listons volontairement notre répertoire '' | ||
| + | |||
| + | <code bash> | ||
| + | # Configuration globale : | ||
| + | # HTTP + redirect | ||
| + | server { | ||
| + | server_name _; | ||
| + | listen | ||
| + | listen | ||
| + | |||
| + | include letsencrypt_security.conf; | ||
| + | |||
| + | location / { | ||
| + | return 301 https:// | ||
| + | } | ||
| + | } | ||
| + | |||
| + | # Domaine liberta.vip sans sous-domaine : | ||
| + | # HTTP + redirect | ||
| + | server { | ||
| + | server_name liberta.vip; | ||
| + | listen | ||
| + | listen | ||
| + | |||
| + | include letsencrypt_security.conf; | ||
| + | |||
| + | location / { | ||
| + | return 301 https:// | ||
| + | } | ||
| + | } | ||
| + | server { | ||
| + | server_name liberta.vip; | ||
| + | listen 443 ssl http2; | ||
| + | listen [::]:443 ssl http2; | ||
| + | ssl_certificate / | ||
| + | ssl_certificate_key / | ||
| + | return 301 https:// | ||
| + | } | ||
| + | # Liberta (Pur HTML / CSS) | ||
| + | # HTTP + redirect | ||
| + | server { | ||
| + | server_name www.liberta.vip; | ||
| + | listen | ||
| + | listen | ||
| + | |||
| + | include letsencrypt_security.conf; | ||
| + | |||
| + | location / { | ||
| + | return 301 https:// | ||
| + | } | ||
| + | } | ||
| + | server { | ||
| + | server_name www.liberta.vip; | ||
| + | listen 443 ssl http2; | ||
| + | listen [::]:443 ssl http2; | ||
| + | ssl_certificate / | ||
| + | ssl_certificate_key / | ||
| + | |||
| + | # Secure headers | ||
| + | add_header X-Frame-Options " | ||
| + | add_header Strict-Transport-Security " | ||
| + | add_header X-Xss-Protection "1; mode=block" | ||
| + | add_header Content-Security-Policy " | ||
| + | add_header X-Content-Type-Options " | ||
| + | |||
| + | |||
| + | root / | ||
| + | access_log / | ||
| + | error_log / | ||
| + | index index.html; | ||
| + | |||
| + | location = / | ||
| + | log_not_found off; | ||
| + | access_log off; | ||
| + | } | ||
| + | |||
| + | location = /robots.txt { | ||
| + | allow all; | ||
| + | log_not_found off; | ||
| + | access_log off; | ||
| + | } | ||
| + | |||
| + | location = /img/ { | ||
| + | allow all; | ||
| + | log_not_found off; | ||
| + | access_log off; | ||
| + | autoindex on; | ||
| + | } | ||
| + | |||
| + | location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | ||
| + | expires max; | ||
| + | log_not_found off; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Nous ne fournirons pas tous les détails des configurations pour chaque application, | ||
| + | |||
| + | À terme, nous prévoyons de publier notre configuration complète sur [[https:// | ||
| + | |||
| + | EN COURS DE RÉDACTION... | ||
| + | === CryptPad | ||
| + | === Etherpad-Lite | ||
| + | === Funkwhale | ||
| + | === Nextcloud | ||
| + | === Peertube | ||
| + | === WriteFreely | ||