Friday, June 26, 2020

How To Start, Stop, And Restart , Reload, Nginx Web Server

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Nginx is a powerful server application that routes network traffic. It’s often used as a reverse proxy server, but can also be configured as a regular web server.

One of the most common operations you will encounter is starting, stopping, and restarting the Nginx web server.

In this tutorial, learn how to start, stop, and restart the Nginx service.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment:Ubuntu 20.04 LTS     Hostname - www.yourdomain.com  - ip Address - 192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Check Nginx version#   nginx -v


Start Nginx# systemctl start nginx           Or service nginx start        Or sudo /etc/init.d/nginx start

Stop Nginx#  systemctl stop nginx            Or service nginx stop         Or sudo /etc/init.d/nginx stop


Restart Nginx# systemctl restart nginx       Or service nginx restart      Or sudo /etc/init.d/nginx restart

Reload Nginx#  systemctl reload nginx        Or service nginx reload       Or sudo /etc/init.d/nginx reload


View server status# systemctl status nginx   Or service nginx status       Or sudo /etc/init.d/nginx status


Test Nginx Configuration# service nginx configtest Or ngixn -t


Show command help#     systemctl -h nginx    Or service nginx -?

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment