Nginx/Setup/
2022-10-17T09:34:48.350072Z
Published on
Method 1: Install Nginx from Ubuntu Repository.
update the repository information:
1sudo apt-get update
install Nginx
1sudo apt-get install nginx -y
To autostart Nginx after restarting the Ubuntu server, execute the following commands.
So when you stop and start the Ubuntu server, systemctl will automatically start the Nginx service.
1sudo systemctl enable nginx
Check Nginx status by executing the below command, If the status is running you’re ready to go.
1systemctl status nginx
To stop the process of the Nginx server, execute the following commands.
1sudo systemctl stop nginx
To start the process of the Nginx server, execute the following commands.
1sudo systemctl start nginx
To restart the process of the Nginx server, execute the following commands.
1sudo systemctl restart nginx
Comments