Certificats SSL - Activé ssl d'un conteneur ovh
... / Activé ssl d'un conteneur ovh
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Frage

Activé ssl d'un conteneur ovh

Von
GerardA4
Erstellungsdatum 2019-12-06 18:01:46 (edited on 2024-09-04 13:58:08) in Certificats SSL

Bonjour à tous développeur et passionnée l'informatique,
j'ai installer docker dans mon serveur VPS nommé vps740737.ovh.net.
Jusqu'ici, tous va bien.
j'ai ensuite créer un conteneur docker dans laquelle j'ai installé apache et php.
jusqu'ici tous va bien toujours.
ensuite j'ai créer un site bade.cf avec le virtualhost suivante :

ServerAdmin contact@bade.cf

ServerName bade.cf

ServerAlias www.bade.cf

DocumentRoot /home/badecf/www

# Des options : ici suivre les liens symboliques
Options FollowSymLinks
# Autoriser l'override, autrement dit les .htaccess
AllowOverride All



Options FollowSymLinks MultiViews

AllowOverride All
Order allow,deny
allow from all
Require all granted



ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined


Et tous fonctionne bien, une fois le site activé bade.cf, j'ai accès au site sans problème lorsque je tape dans la barre d'adresse bade.cf
donc tous va bien.
Par la suite j'ai installé letsenscrypt et j'ai activé le certificat ssl du nom de domaine bade.cf
et là, lorsque je tape dans la barre d'adresse bade.cf, j'obtiens bien le chiffrage en https puisque j'obtiens par la barre d'adresse https://bade.cf, mais j'obtiens une page d'erreur qui me dit que la "La connexion a échoué".
Pourtant tous les configurations sont bien fait dans les fichiers bade.cf.conf et bade.cf-le-ssl.conf qui se trouve dans le dossier /etc/apache2/sites-available.
voici la configuration du fichier bade.cf.conf et bade.cf-le-ssl.conf une fois le ssl activé avec letsenscript.

voici la configuration du fichier bade.cf.conf :

ServerAdmin contact@bade.cf

ServerName bade.cf

ServerAlias www.bade.cf

DocumentRoot /home/badecf/www

# Des options : ici suivre les liens symboliques
Options FollowSymLinks
# Autoriser l'override, autrement dit les .htaccess
AllowOverride All



Options FollowSymLinks MultiViews

AllowOverride All
Order allow,deny
allow from all
Require all granted



ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.bade.cf [OR]
RewriteCond %{SERVER_NAME} =bade.cf
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]


et voici la configuration du fichier bade.cf-le-ssl.conf :


ServerAdmin contact@bade.cf

ServerName bade.cf

ServerAlias www.bade.cf

DocumentRoot /home/badecf/www

# Des options : ici suivre les liens symboliques
Options FollowSymLinks
# Autoriser l'override, autrement dit les .htaccess
AllowOverride All



Options FollowSymLinks MultiViews

AllowOverride All
Order allow,deny
allow from all
Require all granted



ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined


Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/bade.cf/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/bade.cf/privkey.pem



Et pourtant,
lorsque j’installe apache2, PHP et sur le vps directement et que j'active le ssl avec letsenscrypt, bade.cf fonctionne trés bien en https dans un navigateur.

je vais allez prendre un café en attendant les réponses sur ce point.


1 Antwort ( Latest reply on 2023-11-10 16:42:34 Von
f9024f0f379c0759a27b
)

Il est long ce café