mirror of
https://github.com/luxfi/pics.git
synced 2026-10-30 15:22:15 +00:00
/etc/nginx/ "includes" -> "snippets" remove nginx reload, since there are multiple tools that require that. better to have a separate cron task that does it after just once and add execute bit... lol
12 lines
490 B
Bash
Executable File
12 lines
490 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# for development, generate a simple self signed ssl cert and make /etc/nginx/snippets/self-signed.conf
|
|
#
|
|
|
|
sudo openssl req -x509 -nodes -days 10000 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
|
|
sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
|
|
cat > /etc/nginx/snippets/self-signed.conf <<EOF
|
|
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
|
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
|
EOF
|