Skip to content
Menu
dethys.be
  • Accueil
  • Informatique / Réseau
  • Mon passage à Linux
  • Autres
dethys.be

Activation de l’HTTPS autosigné sur Apache

Posted on 28 août 202011 février 2021

Matériel requis

  • Machine sous Ubuntu ou Debian
  • Apache server installé

Marche à suivre

Installation d’openssl.

sudo apt-get update
sudo apt-get install openssl

Création de la clé et du certificat

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selsigned.key -out /etc/ssl/certs/apache-selfsigned.crt

Création d’une copie du fichier de configuration et edition de celui ci grâce au générateur de configuration de Mozilla

/!\ Penser à changer le chemin de la clé et du certificat.
/!\ Penser à caresser un lama
/!\ Penser à ajouter le chemin du site

cd /etc/apache2/sites-enabled
cp 000-default.conf 000-default.conf.default
nano 000-default.conf
# generated 2020-08-28, Mozilla Guideline v5.6, Apache 2.4.41, OpenSSL 1.1.1d, intermediate configuration 
# https://ssl-config.mozilla.org/
#server=apache&version=2.4.41&config=intermediate&openssl=1.1.1d&guideline=5.6 
# this configuration requires mod_ssl, mod_socache_shmcb, mod_rewrite, and mod_headers 

<VirtualHost *:80>
     RewriteEngine On
     RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
     Document root /var/www/html 
</VirtualHost> 

<VirtualHost *:443>
     SSLEngine on
     Document root /var/www/html

     # curl https://ssl-config.mozilla.org/ffdhe2048.txt >> /path/to/signed_cert_and_intermediate_certs_and_dhparams
     SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
     SSLCertificateKeyFile /etc/ssl/private/apache-selsigned.key

     # enable HTTP/2, if available
     Protocols h2 http/1.1

     # HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
     Header always set Strict-Transport-Security "max-age=63072000" 
</VirtualHost>

# intermediate configuration 
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 
SSLHonorCipherOrder off 
SSLSessionTickets off 

SSLUseStapling On 
SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"

Activer les modules nécéssaire

a2enmod ssl socache_shmcb rewrite headers

Rechercher

Articles récents

  • Installation de KVM sur Debian
  • [Linux] Les logiciels que j’utilise
  • [Linux] Monter automatiquement un partage SMB
  • [OpenMediaVault] Faire un RAID à partir de disques USB
  • Activation de l’HTTPS autosigné sur Apache

Archives

  • octobre 2020
  • septembre 2020
  • août 2020
  • juin 2020
  • mai 2020

Catégories

  • Accueil
  • Informatique / Réseau
  • Mon passage à Linux
  • Autres

Derniers articles

  • Installation de KVM sur Debian
  • [Linux] Les logiciels que j’utilise
  • [Linux] Monter automatiquement un partage SMB
  • [OpenMediaVault] Faire un RAID à partir de disques USB
  • Activation de l’HTTPS autosigné sur Apache

Plus de news ici

c.dethys

🍩 . . . . . #liveauthentic #foodbeast #eeeeea 🍩

.
.
.
.
.
 #liveauthentic #foodbeast #eeeeeats #eatfamous #feedfeed #dailyfoodfeed #onthetable #animallovers #animalpolis #animalsofinstagram #igscwildlife #animales #exclusive_animals #wildlifephoto #wildlifeaddicts #wildlifephotography #visitbelgium #instabelgium #igbelgium #travelbelgium #belgium_unite #canonphotos #canoneos #canonrebel #canonphotographer #donuts #bourriquet
🚶 . . . . . #animallovers #animalpolis #animal 🚶
.
.
.
.
.
 #animallovers #animalpolis #animalsofinstagram #igscwildlife #animales #exclusive_animals #wildlifephoto #naturelovers #awesome_earthpix #liveauthentic #thecreative #livefolk #mountainlove #gottalove_a_ #instamountain #nature_perfection #france_vacations #wu_france #france_photolovers #unlimitedfrance #exclusive_france #canonphotos #canoneos #canonrebel #canonphotographer #auvergne #walking #blackandwhite
🌉 . . . . . #photosoubliees #citybestpics #agam 🌉
.
.
.
.
.
#photosoubliees #citybestpics #agameoftones #city_explore #illgrammers #thecreative #shotaward #seemycity #instapassport #aroundtheworldpix #ig_masterpiece #campinassp #flashesofdelight #travelog #mytinyatlas #visualmobs #theglobewanderer #ig_italy #instaitaly #igersitaly #loves_italia #gf_italy #canonphotos #canoneos #canonrebel #canonphotographer #pontevecchio
🌁 . . . . . #citybestpics #agameoftones #city_ 🌁
.
.
.
.
.
 #citybestpics #agameoftones #city_explore #illgrammers #thecreative #shotaward #seemycity #instapassport #aroundtheworldpix #ig_masterpiece #campinassp #flashesofdelight #travelog #mytinyatlas #visualmobs #theglobewanderer #ig_italy #instaitaly #igersitaly #loves_italia #gf_italy #canonphotos #canoneos #canonrebel #canonphotographer #siena #tuscany
Firenze again 😍 lovely weather during the winte Firenze again 😍 lovely weather during the winter !
.
.
.
.
.
 #citybestpics #agameoftones #city_explore #illgrammers #thecreative #shotaward #seemycity #instapassport #aroundtheworldpix #ig_masterpiece #campinassp #flashesofdelight #travelog #mytinyatlas #visualmobs #theglobewanderer #igersfirenze #firenzecityofficial #florenceitaly #florenceandtuscany #firenze4ever #canonphotos #canoneos #canonrebel #canonphotographer #toscana
🚗 . . . . . #urbex #streetshared #aov #weekly_ 🚗
.
.
.
.
.
 #urbex #streetshared #aov #weekly_feature #createexploretakeover #shotzdelight #mkexplore #neverstopexploring #longexposure_shots #agameoftones #night_shooterz #ig_masterpiece #longexpo #magicpict #ig_nightphotography #astrophotography #visitbelgium #instabelgium #igbelgium #travelbelgium #belgium_unite #canonphotos #canoneos #canonrebel #canonphotographer #focalmarked
@namurmabelle
Just a try.. . . . . . #hsdailyfeature #streetmee Just a try.. .
.
.
.
.
 #hsdailyfeature #streetmeetina #urbanandstreet #symmetricalmonsters #streetmobs #seemycity #uncalculated #guardiancities #yngkillers #1stinstinct #meistershots #streetframe #citykillerz  #visitbelgium #instabelgium #igbelgium #travelbelgium #canonphotos #canoneos #canonrebel #focalmarked #namur
Fête de l'Université de Namur, 4h cuistax . . . Fête de l'Université de Namur, 4h cuistax
.
.
.
.
.
#namur #universite #belgium #cuistax #event #course #etudiant #unamur #canon #event 
@age_unamur 
Camera : @canonbelgium
Suivez sur Instagram
©2021 dethys.be | Powered by WordPress and Superb Themes!