...

Open source softwares - NGINX

Back to Course

Lesson Description


Lession - #614 Verify the Installation


Verify the Installation

We can verify the installation of Nginx in different ways:

1. Check the Version of Nginx

We can confirm that the Nginx is introduced and really take a look at its form by utilizing the accompanying order:

$ nginx -v  
Output:

nginx version: nginx/1.17.0


2. Check Nginx is running or not

We can verify that the Nginx is installed and running by using the following command:

$ ps -ef | grep nginx  
Output:

root   3105  1  0  15:39 ?       00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;

www-data  3106  3105 0 15:39 ?   00:00:00 nginx: worker process
nikita 3186 1643 0 15:43 pts/0      00:00:00 grep --color=auto nginx


Here, the ps command is used to list the running processes. By piping it to grep, we can search for specific words in the output. This above example uses grep to search for nginx. The result shows three running processes, i.e., a master and two worker processes. If Nginx is running, we will always see a master and one or more worker processes. Hence, we can say that our installed Nginx is running properly.

3. Check your web server

In the event that Nginx is introduced effectively, the webserver ought to currently be going: We can check this by utilizing the accompanying order to ensure that the assistance is running:

$ systemctl status nginx 


We can see from the above mentioned, the help seems to have begun effectively. In any case, the most effective way to check this is to demand a page from Nginx. We can get to the default Nginx page to ensure that the product is running appropriately. We can get to this through our server's space name or IP address. Or on the other hand we can utilize http://localhost on Windows. We ought to see the "Welcome to Nginx" default page. In the event that we see that page, we should rest assured that Nginx has been introduced appropriately.