add subject alternative names to self-siged certificate

pull/30/head
Kelke van Lessen 2024-03-19 15:08:16 +01:00
parent fe531d5806
commit 3268ed9334
1 changed files with 2 additions and 1 deletions

3
core/files/entrypoint_nginx.sh Executable file → Normal file
View File

@ -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