Skip to content

Commit

Permalink
Extend ssl-certificate expire date
Browse files Browse the repository at this point in the history
  • Loading branch information
Marika Bertelli authored and Marika Bertelli committed Feb 3, 2025
1 parent 17546e4 commit a8ef99a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion images/wordpress/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions images/wordpress/openssl.cnf
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[dn]
[dn]
CN=localhost
[req]
distinguished_name = dn
distinguished_name = dn
[EXT]
subjectAltName=DNS:localhost
keyUsage=digitalSignature
extendedKeyUsage=serverAuth

0 comments on commit a8ef99a

Please sign in to comment.