dnf -y install nginxserver_name myhost.mydomain
dnf -y install snapdsystemctl start snapdsnap install coresnap refresh corednf 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 certbotln -s /snap/bin/certbot /usr/bin/certbotsystemctl 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 nginxsystemctl status nginxjournalctl -xe
-A INPUT -p tcp --dport 443 --syn -j ACCEPT
-A INPUT -p tcp --dport 80 --syn -j ACCEPT
in the file systemctl start iptablessystemctl start firewalldsystemctl enable nginxsystemctl stop nginxsystemctl restart nginxsystemctl enable nginx