Last active
December 23, 2022 10:43
-
-
Save clemlatz/35cf6765f935e7930807 to your computer and use it in GitHub Desktop.
Set up ssl proxy with nginx and letsencrypt (https://secure.example.com => http://example.com)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update & upgrade | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Install & start nginx | |
sudo apt-get install nginx -y | |
sudo service nginx start | |
# Install git | |
sudo apt-get install git -y | |
# Install letsencrypt | |
git clone https://github.com/letsencrypt/letsencrypt | |
cd letsencrypt | |
# Install letsencrypt dependencies | |
./letsencrypt-auto --help all | |
# Stop nginx (port 80 needed by letsencrypt) | |
sudo nginx service stop | |
# Generate certificate | |
./letsencrypt-auto certonly --rsa-key-size 4096 | |
# Generate a strong Diffie-Hellman (2048-bit) group | |
sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment