stop nginx ubuntu 1

stop nginx ubuntu

sudo systemctl start nginx 
sudo systemctl stop nginx 
sudo systemctl restart nginx

sudo service nginx start
sudo service nginx stop
sudo service nginx restart

Here is what the above code is Doing:
1. We’re creating a new directory called /etc/nginx/sites-available.
2. We’re creating a new file called /etc/nginx/sites-available/myproject.
3. We’re creating a symbolic link from /etc/nginx/sites-available/myproject to /etc/nginx/sites-enabled/myproject.
4. We’re removing the default symbolic link from /etc/nginx/sites-enabled/default.
5. We’re restarting the Nginx process to read our new config.

Similar Posts