Nginx is known for its use as a web server and a reverse proxy.
It has several commands that can be useful when deploying new sites.
I have written the most commonly used nginx commands list sucthat i or any other person can easily look them up whenever needed.
1. Install nginx command:
sudo apt update
sudo apt install nginx
2. Check if nginx is running:
systemctl status nginx
3. Check for syntax errors in nginx files:
nginx -t
4. Restart nginx:
sudo systemctl restart nginx
5. Create a symlink from sites-available to sites-enabled
sudo ln -s /etc/nginx/sites-available/**your_domain** /etc/nginx/sites-enabled/
6. Start Nginx :
sudo systemctl stop nginx
7. Stop nginx :
sudo systemctl start nginx
Top comments (0)