linux_privatebin

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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:20] – [PrivateBin - Installation d'une solution de partage de texte sécurisée] nekanlinux_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</sxh> service apache2 restart</sxh>
  
Ligne 53: Ligne 54:
   * Le contenu de ce fichier de configuration :   * Le contenu de ce fichier de configuration :
 <file><VirtualHost *:80> <file><VirtualHost *:80>
-        ServerName 10.30.1.128+        ServerName mon.privatebin.com
         DocumentRoot /var/www/privatebin/         DocumentRoot /var/www/privatebin/
  
 +        # Redirection vers HTTPS
         RewriteEngine On         RewriteEngine On
-        RewriteCond %{SERVER_NAME} =www.shyrkasystem.com +        RewriteRule ^(.*)$ https://mon.privatebin.com/$1 [R=301,L]
-        RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] +
 </VirtualHost> </VirtualHost>
  
  
 <VirtualHost *:443> <VirtualHost *:443>
-        ServerName 10.30.1.128+        ServerName mon.privatebin.com
         DocumentRoot /var/www/privatebin/         DocumentRoot /var/www/privatebin/
 +        Protocols h2 http/1.1
 +        
 +        # Log
         ErrorLog ${APACHE_LOG_DIR}/privatebin-error.log         ErrorLog ${APACHE_LOG_DIR}/privatebin-error.log
         CustomLog ${APACHE_LOG_DIR}/privatebin-access.log combined         CustomLog ${APACHE_LOG_DIR}/privatebin-access.log combined
 +        
         <Directory /var/www/privatebin>         <Directory /var/www/privatebin>
                 AllowOverride All                 AllowOverride All
         </Directory>         </Directory>
 +        
 +        # HSTS (mod_headers is required) (15768000 seconds = 6 months)
 +        Header  always set Strict-Transport-Security "max-age=15768000"
 +        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 "same-origin"
 +        Header always set Feature-Policy "microphone 'none'; payment 'none'; sync-xhr 'self' https://mon.privatebin.com"
  
 +        # SSL
         SSLEngine On         SSLEngine On
         SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem         SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
  • linux_privatebin.1651177229.txt.gz
  • Dernière modification : 2022/04/28 20:20
  • de nekan