diff --git a/images/wordpress/Dockerfile b/images/wordpress/Dockerfile index 720c322..ac1ad43 100644 --- a/images/wordpress/Dockerfile +++ b/images/wordpress/Dockerfile @@ -35,12 +35,14 @@ COPY mu-plugins /usr/src/mu-plugins/ COPY wp-config.php /var/www/html/wp-config.php COPY openssl.cnf /etc/ssl/openssl.cnf -RUN openssl req -x509 -out /etc/ssl/certs/apache-localhost.crt \ +RUN openssl req -x509 -days 3650 -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 /etc/ssl/openssl.cnf + + COPY apache-https.conf /etc/apache2/sites-available/ RUN a2enmod ssl RUN a2ensite apache-https diff --git a/images/wordpress/openssl.cnf b/images/wordpress/openssl.cnf index 9220065..58eda60 100644 --- a/images/wordpress/openssl.cnf +++ b/images/wordpress/openssl.cnf @@ -1,8 +1,9 @@ - [dn] +[dn] CN=localhost [req] -distinguished_name = dn +distinguished_name = dn [EXT] subjectAltName=DNS:localhost keyUsage=digitalSignature extendedKeyUsage=serverAuth +