This commit is contained in:
Alex Thomassen 2018-10-23 15:02:41 +02:00 committed by GitHub
parent 4756ccdcc9
commit 8e15482dbf
1 changed files with 25 additions and 0 deletions

25
setup.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash
GIST="https://gist.github.com/Decicus/2f09db5d30f4f24e39de3792bba75b72/raw"
NGINX="/etc/nginx"
# Make sure the 'essentials' are installed
sudo apt install -y nginx openssl curl
# Get acme.sh for issuing certificates
curl -L https://get.acme.sh/ | sudo bash
# Now the fun starts
# Get the alias config for Let's Encrypt challenges:
curl -L "$GIST/letsencrypt.conf" > "$NGINX/letsencrypt.conf"
# Get the base SSL configuration
curl -L "$GIST/ssl_params.conf" > "$NGINX/ssl_params.conf"
# Get the PHP 7.2 FPM configuration (not enabled by default)
curl -L "$GIST/phpfpm.conf" > "$NGINX/phpfpm.conf"
# Get the dhparams file generation script, and execute.
curl -L "$GIST/generate-dhparams.sh" | sudo bash
echo "Base setup done. Open this link for a base nginx site configuration: $GIST/000-default.conf"