Skip to content

Commit

Permalink
add subject alternative names to self-siged certificate (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelke authored Mar 24, 2024
1 parent 940e9e6 commit 92c2219
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/files/entrypoint_nginx.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ init_nginx() {

if [[ ! -f /etc/nginx/certs/cert.pem || ! -f /etc/nginx/certs/key.pem ]]; then
echo "... generating new self-signed TLS certificate"
openssl req -x509 -subj '/CN=localhost' -nodes -newkey rsa:4096 -keyout /etc/nginx/certs/key.pem -out /etc/nginx/certs/cert.pem -days 365
openssl req -x509 -subj '/CN=localhost' -nodes -newkey rsa:4096 -keyout /etc/nginx/certs/key.pem -out /etc/nginx/certs/cert.pem -days 365 \
-addext "subjectAltName = DNS:localhost, IP:127.0.0.1, IP:::1"
else
echo "... TLS certificates found"
fi
Expand Down

0 comments on commit 92c2219

Please sign in to comment.