Apache2 Authentification par certificat
Aller à la navigation
Aller à la recherche
— Serveur Web —
Certificats SSL Web | .htaccess | Authentification par certificat | Authentification par carte à puce PKI | Certificats Let's Encrypt
Archives : Ancien article sur Apache2 | Module Whois | ProFTPd
Certificats de l’autorité racine émettant les cartes à puce
- Se rendre sur le site web de l’autorité de certification IGC-Santé accessible depuis le lien http://igc-sante.esante.gouv.fr.
- Télécharger le fichier de certificat au format PKCS#7 (P7B) regroupant tous les certificats racine de l’autorité.
- Téléverser ce fichier sur le serveur web via une connexion SFTP.
Configuration initiale
- Pour illustrer cette documentation – nous déploierons à titre d’exemple – l’authentification par carte à puce sur le site web fictif www.smartcard.lan.
- Sur notre serveur web Apache2, ce site dispose d’un vhost dédié. Voici la configuration initiale de ce vhost sauvegardée dans le fichier /etc/apache2/sites-available/www.smartcard.lan.conf :
<VirtualHost *:80>
DocumentRoot /var/www/smartcard.lan/www/
ServerName www.smartcard.lan
ErrorLog ${APACHE_LOG_DIR}/smartcard.lan_error.log
CustomLog ${APACHE_LOG_DIR}/smartcard.lan_access.log combined
RedirectPermanent "/" "https://www.smartcard.lan"
<Directory /var/www/smartcard.lan/www/>
allow from all
AllowOverride all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/smartcard.lan/www/
ServerName www.smartcard.lan
ErrorLog ${APACHE_LOG_DIR}/smartcard.lan_error.log
CustomLog ${APACHE_LOG_DIR}/smartcard.lan_access.log combined
<Directory /var/www/smartcard.lan/www/>
allow from all
AllowOverride all
Options +Indexes
</Directory>
SSLEngine on
SSLCertificateFile /etc/ssl/private/smartcard.lan.crt
SSLCertificateKeyFile /etc/ssl/private/smartcard.lan.key
</VirtualHost>