« Apache2 Authentification par carte à puce » : différence entre les versions

De NCad Wiki
Aller à la navigation Aller à la recherche
(Page créée avec « {{Serveur Web}} Category:Apache2 »)
 
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
{{Serveur Web}}
{{Serveur Web}}


[[Category:Apache2]]
=== 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>

Version du 13 juillet 2024 à 21:06

Serveur Web

Installation d'Apache2 Paramétrage courant

Certificats SSL Web | .htaccess | Authentification par carte à puce | Certificats Let's Encrypt


Archives : Ancien article sur Apache2 | Module Whois | ProFTPd


Note de version

Certificats de l’autorité racine émettant les cartes à puce

  1. Se rendre sur le site web de l’autorité de certification IGC-Santé accessible depuis le lien http://igc-sante.esante.gouv.fr.
  2. Télécharger le fichier de certificat au format PKCS#7 (P7B) regroupant tous les certificats racine de l’autorité.
  3. 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>