diff --git a/haini.sh b/haini.sh index c52a7df..ccffe01 100755 --- a/haini.sh +++ b/haini.sh @@ -59,7 +59,7 @@ generar_certificado() { chmod 700 "$ENTORNO/etc/ssl/private" ca_key="/etc/ssl/private/ca-sutty.key" - ca_crt="/etc/ssl/certs/ca-sutty.crt" + ca_crt="/usr/local/share/ca-certificates/ca-sutty.crt" domain_key="/etc/ssl/private/sutty.local.key" domain_csr="/etc/ssl/private/sutty.local.csr" @@ -87,6 +87,8 @@ generar_certificado() { -subj '/C=IN/ST=Cyberspace/L=Cyberspace/O=Sutty/OU=Espacio/CN=Sutty Local CA' \ -days 3650 -out $ca_crt" + correr "update-ca-certificates" + correr "openssl req -nodes -newkey rsa:2048 -keyout $domain_key -out $domain_csr \ -subj '/C=IN/ST=Cyberspace/L=Cyberspace/O=Sutty/OU=Espacio/CN=sutty.local/CN=*.sutty.local'" correr "openssl x509 -req -in $domain_csr \ diff --git a/nginx.conf b/nginx.conf index 736297c..f410a90 100644 --- a/nginx.conf +++ b/nginx.conf @@ -2,8 +2,8 @@ server { server_name ~(?.+).sutty.local; listen 4000 ssl http2 default_server; - ssl_certificate /Sutty/sutty.local/domain/sutty.local.crt; - ssl_certificate_key /Sutty/sutty.local/domain/sutty.local.key; + ssl_certificate /etc/ssl/certs/sutty.local.crt; + ssl_certificate_key /etc/ssl/private/sutty.local.key; root /Sutty/$domain-jekyll-theme/_site;