Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| linux_privatebin [2022/04/28 20:25] – [Configuration d'Apache] nekan | linux_privatebin [2022/05/02 07:41] (Version actuelle) – [Prérequis] nekan | ||
|---|---|---|---|
| Ligne 26: | Ligne 26: | ||
| a2enmod ssl | a2enmod ssl | ||
| a2enmod rewrite | a2enmod rewrite | ||
| + | a2enmod headers | ||
| service apache2 restart</ | service apache2 restart</ | ||
| Ligne 56: | Ligne 57: | ||
| DocumentRoot / | DocumentRoot / | ||
| + | # Redirection vers HTTPS | ||
| RewriteEngine On | RewriteEngine On | ||
| - | | + | RewriteRule ^(.*)$ https://mon.privatebin.com/ |
| - | | + | |
| </ | </ | ||
| Ligne 66: | Ligne 66: | ||
| ServerName mon.privatebin.com | ServerName mon.privatebin.com | ||
| DocumentRoot / | DocumentRoot / | ||
| + | Protocols h2 http/1.1 | ||
| + | | ||
| + | # Log | ||
| ErrorLog ${APACHE_LOG_DIR}/ | ErrorLog ${APACHE_LOG_DIR}/ | ||
| CustomLog ${APACHE_LOG_DIR}/ | CustomLog ${APACHE_LOG_DIR}/ | ||
| + | | ||
| < | < | ||
| AllowOverride All | AllowOverride All | ||
| </ | </ | ||
| + | | ||
| + | # HSTS (mod_headers is required) (15768000 seconds = 6 months) | ||
| + | Header | ||
| + | Header set X-Frame-Options SAMEORIGIN | ||
| + | Header set X-XSS-Protection "1; mode=block" | ||
| + | Header set X-Content-Type-Options nosniff | ||
| + | Header always set Referrer-Policy " | ||
| + | Header always set Feature-Policy " | ||
| + | # SSL | ||
| SSLEngine On | SSLEngine On | ||
| SSLCertificateFile | SSLCertificateFile | ||