WEB Server
A web server is computer software and underlying hardware that accepts requests via HTTP and HTTPS the network protocol created to distribute web pages and multimedia content via internet or intranet.
Some famous Web services
Apache
IIS
NGINX
Tomcat
Here i am going to explain how to install Nginx webserver and how to configure it
First update your server with latest packages.
sudo apt-get update -y
then install nginx latest version.
sudo apt-get install nginx -y
allow nginx required forts in firewall.
sudo ufw allow 'Nginx Full'
Give folder permission to your Webroot
chown -R $USER:$USER /var/www/html/
chmod -R 755 /var/www/html/
create index.html file in Webroot
echo "Shivam" > /var/www/html/index.html
Check the nginx status and restart it.
sudo service nginx status
sudo service nginx restart
Install snapd package manager and enable on start up
sudo apt install snapd -y
sudo systemctl enable --now snapd
install certbot using snapd and create s symbolic link
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
run certbot and get certificate
sudo certbot --nginx
add certbots PPA repository and update the os.
sudo add-apt-repository ppa:certbot/certbot -y
sudo apt-get update -y
Now we are going to install nginx certbot package.
sudo apt install python-certbot-nginx -y
after that we are going to get ssl using certbot
Syntax sudo certbot --nginx -d domainname.com -d domainame.com
sudo certbot --nginx -d www.try.venketraman.com -d try.venketraman.com
first it asks mail id for renewal notification
after that its asks agree the license agreement
after that its asks http to https redirection
Give no 2 for certbot auto redirection
now you can check your website is secured with ssl.
additionally you can check your certificate trust level in ssl labs website.
In this article i have explained how to install nginx and how to configure ssl .