From b2bab207b4bb79e996d4bb8c56e9558bf36f9890 Mon Sep 17 00:00:00 2001 From: Marika Bertelli Date: Thu, 30 Jan 2025 16:03:26 +0000 Subject: [PATCH] Feat: generate ssl-cert --- images/wordpress/Dockerfile | 21 +++++++++++++++++++++ images/wordpress/apache-https.conf | 8 ++++++++ 2 files changed, 29 insertions(+) create mode 100644 images/wordpress/apache-https.conf diff --git a/images/wordpress/Dockerfile b/images/wordpress/Dockerfile index 30919b4..b668a5d 100644 --- a/images/wordpress/Dockerfile +++ b/images/wordpress/Dockerfile @@ -32,5 +32,26 @@ COPY wordpress.conf /etc/apache2/sites-enabled/ COPY mu-plugins /usr/src/mu-plugins/ COPY wp-config.php /var/www/html/wp-config.php +RUN openssl req -x509 \ +-out /etc/ssl/certs/apache-localhost.crt \ +-keyout /etc/ssl/private/apache-localhost.key \ +-newkey rsa:2048 -nodes -sha256 \ +-subj '/CN=localhost' \ +-extensions EXT \ +-config /dev/stdin < + DocumentRoot "/var/www/html" + ServerName localhost + + SSLEngine on + SSLCertificateFile "/etc/ssl/certs/apache-localhost.crt" + SSLCertificateKeyFile "/etc/ssl/private/apache-localhost.key" + \ No newline at end of file