add subject alternative names to self-siged certificate (#30)

pull/41/head
Kelke vl 2024-03-24 16:20:18 +01:00 committed by GitHub
parent 940e9e6e73
commit 92c22192dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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 if [[ ! -f /etc/nginx/certs/cert.pem || ! -f /etc/nginx/certs/key.pem ]]; then
echo "... generating new self-signed TLS certificate" 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 else
echo "... TLS certificates found" echo "... TLS certificates found"
fi fi