• How to check if Nginx is running or not?

    by  • November 7, 2018 • Blog • 0 Comments

    Nginx is running or not look like an very simple task but sometimes the check command won’t work as it should. In this case, we need some more ways to check. Let me show some all of ways I know about check Nginx running, simply try one by one.

    Official command to check Nginx running or not

    After this command you will see something like this.

    In this case, the same information will be shown if you use this command

    use “Lsof” to check Nginx running

    Check port 80 to make sure Nginx is listing port 80. If lsof is not available let’s install it

    On CentOS:

    On Ubuntu

    Then using this command to check nginx

    If everything work well, you will see the output like this

    Check Nginx running with nmap

    Another way to check port 80 to make sure Nginx is running. Let’s run this command

    If nginx is running, you will see this output

    If nmap is not available let’s install it

    On CentOS:

    On Ubuntu

    Check Nginx running with scripting

    Another best way for you to check nginx running with script, simple use this line

    If nginx is running you will see the output is “nginx is running”.

    Goodluck for your job.

    References:

    https://stackoverflow.com/questions/35220654/how-to-verify-if-nginx-is-running-or-not

    https://medium.com/@madhan5000/first-off-check-if-nginx-is-running-e29759bdb2c

     

    Leave a Reply

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