Most Used Nginx Commands For Beginners

Common And Most Used Nginx Commands For Beginners

Insight: Common And Most Used Nginx Commands For Beginners

Nginx is a popular open source web server developed by Igor Sysoev. It can be used as a HTTP server, reverse proxy, load balancer and mail proxy.

Today, We will talk about the common and most used Nginx commands among Linux users.

Common And Most Used Nginx Commands For Beginners

At first, if you are wondering about the process to install Nginx in Linux based operating system, then run the following commands:

For Fedora:

sudo apt install nginx

For CentOS/RHEL

sudo yum install epel-release && yum install nginx

For Ubuntu Or Debian based operating system.

sudo dnf install nginx                      

For Command Help:
Run the following command to see the all Nginx commands guide:

systemctl -h nginx

1. Command To Start Nginx Service

Run the following command to start Nginx service in Linux:

sudo systemctl start nginx

Alternate command:

sudo service nginx start

2. Check Nginx Version

Run the following command to check the Nginx version:

nginx -v

3. Enable Nginx Service

Run the following command to enable Nginx service in Linux:

sudo systemctl enable nginx

OR

sudo service nginx enable

4. Restart Nginx Service

Run the following command to restart Nginx service in Linux:

sudo systemctl restart nginx # for systemd

OR

sudo service nginx restart   # for sysv init

5. Reload Nginx Service

Run the following command in Linux to reload Nginx service:

sudo systemctl reload nginx #for systemd

OR

sudo service nginx reload   #for sysvini

6. Command To View Nginx Service Status

sudo systemctl status nginx

7. Stop Nginx Service

Command to stop Nginx service in Linux:

sudo systemctl stop nginx #systemd

Or,

sudo service nginx stop   #sysvinit

 

READ More Relevant Stuff:  Ubuntu Based Linux Rescue Distro Rescuezilla 1.0.6 Released

This much for now, We will update this post on regular basis. Let me know if you have confusion in this Common And Most Used Nginx Commands post.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *