Skip to content

Commit afd61c1

Browse files
committed
Update server deployment due to let's encrypt setup changes.
1 parent 5502ea1 commit afd61c1

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

apps/py/ch12_deployment/server_setup/server_setup.sh

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ sudo apt-get install -y -q nginx
1515
# for gzip support in uwsgi
1616
sudo apt-get install --no-install-recommends -y -q libpcre3-dev libz-dev
1717

18-
# Stop the hackers
19-
sudo apt install fail2ban -y
18+
# Fail2ban no longer supported
19+
# Skip this for now.
20+
# sudo apt install fail2ban -y
2021

2122
ufw allow 22
2223
ufw allow 80
@@ -78,9 +79,27 @@ update-rc.d nginx enable
7879
service nginx restart
7980

8081

81-
# Optionally add SSL support via Let's Encrypt:
82-
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04
82+
# Optionally add SSL support via Let's Encrypt
83+
# NOTE: These steps have changed since the recording.
8384

84-
add-apt-repository ppa:certbot/certbot
85-
apt install python-certbot-nginx
85+
####### NEW STEPS ###############################################
86+
# See https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal&tab=standard
87+
88+
# Because always a good idea :)
89+
apt update
90+
apt upgrade
91+
92+
# Not need even though it's in the instructions, is installed on Ubuntu
93+
# Skip -> install snapd https://snapcraft.io/docs/installing-snapd
94+
95+
snap install --classic certbot
96+
ln -s /snap/bin/certbot /usr/bin/certbot
8697
certbot --nginx -d guitary.talkpython.com
98+
99+
####### THESE ARE THE OLD STEPS #################################
100+
#
101+
## https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04
102+
#
103+
#add-apt-repository ppa:certbot/certbot
104+
#apt install python-certbot-nginx
105+
#certbot --nginx -d guitary.talkpython.com

0 commit comments

Comments
 (0)