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:09] – [Stockage] LibertAdmin | tech:web-01 [14/10/2025 08:15] (Version actuelle) – [Liberta (Site principal)] LibertAdmin | ||
|---|---|---|---|
| Ligne 1178: | Ligne 1178: | ||
| ==== Partie logicielle ==== | ==== Partie logicielle ==== | ||
| - | Toutes les applications web des services sont servies par le serveur / reverse-proxy Nginx dont voici les configurations pour chaque application ainsi que les configurations communes, notamment pour nos certificats Let's Encrypt | + | Toutes les applications web des services sont servies par le serveur / reverse-proxy Nginx dont voici les configurations pour chaque application ainsi que les configurations communes. |
| + | |||
| + | Nous avons décidé de bannir dans la configuration générale un certain nombre de pays nous noyant de spam et d'attaques en tout genre : | ||
| <code bash> | <code bash> | ||
| Ligne 1218: | Ligne 1220: | ||
| proxy_buffers 16 16k; | proxy_buffers 16 16k; | ||
| proxy_buffer_size 16k; | proxy_buffer_size 16k; | ||
| - | | + | fastcgi_buffers 64 4K; |
| client_max_body_size 8G; | client_max_body_size 8G; | ||
| Ligne 1296: | Ligne 1298: | ||
| include / | include / | ||
| } | } | ||
| + | </ | ||
| + | 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) : | ||
| + | |||
| + | <code bash> | ||
| + | # cat / | ||
| + | # Security headers | ||
| + | add_header X-XSS-Protection | ||
| + | add_header X-Content-Type-Options | ||
| + | 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 (Liberta Docs)=== | ||
| + | === Etherpad-Lite (Liberta Pad) === | ||
| + | === Funkwhale (Liberta Audio) === | ||
| + | === Nextcloud (Liberta Cloud) === | ||
| + | === Peertube (Liberta Vidéo) === | ||
| + | === WriteFreely (Liberta Blogs) === | ||
| - | === Castopod | ||