This is a guide for configuring Nginx, PHP, and Let’s Encrypt for a Web Server.
Install Nginx
$ sudo apt-get install nginx net-tools -y
$ netstat -antFirewall
$ sudo ufw app list
$ sudo ufw allow 'Nginx Full'
$ sudo ufw allow 'OpenSSH'
$ sudo service ufw enable
$ sudo service ufw start
$ sudo ufw statusPHP
$ sudo apt-get install php-fpm
$ sudo vi defaultUncomment PHP enabling
Site
$ cd /var/www/html
$ sudo rm index.nginx-debian.html
$ sudo touch index.html
$ sudo echo "<?php phpinfo(); ?>" > test.phpEncryption
Certbot automates renewal through Let’s Encrypt.
$ sudo apt-get install snapd
$ sudo snap install --classic certbot
$ sudo certbot --nginx
$