dnf -y install nginx
server_name myhost.mydomain
dnf -y install snapd
systemctl start snapd
snap install core
snap refresh core
dnf remove certbot
(just in case it had been installed before from the Fedora repo. If not, dnf will do nothing.)ln -s /var/lib/snapd/snap /snap
(the next command with option --classic will not work otherwise)snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
systemctl stop iptables
or withsystemctl stop firewalld
depending on the firewall you usecertbot --nginx
server {
if ($host = ) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name myhost.mydomain;
return 404; # managed by Certbot
systemctl start nginx
systemctl status nginx
journalctl -xe
-A INPUT -p tcp --dport 443 --syn -j ACCEPT
-A INPUT -p tcp --dport 80 --syn -j ACCEPT
in the file systemctl start iptables
systemctl start firewalld
systemctl enable nginx
systemctl stop nginx
systemctl restart nginx
systemctl enable nginx