Files
seaweedFS/unmaintained/local-nginx/gen_certs.sh
2026-01-08 09:59:31 -08:00

12 lines
330 B
Bash
Executable File

#!/bin/bash
set -e
# Generate a private key
openssl genrsa -out key.pem 2048
# Generate a self-signed certificate
openssl req -new -x509 -key key.pem -out cert.pem -days 365 \
-subj "/C=US/ST=State/L=City/O=Organization/OU=Unit/CN=localhost"
echo "Certificate (cert.pem) and Key (key.pem) generated successfully in $(pwd)"