Controlling Nginx

If you need full control over your NGINX webserver you can use this commands to start, stop and restart NGINX.

sudo nginx # start sudo nginx -s stop # stop sudo nginx -s reload # restart

Now its time to look about NGINX working, go to your browser and type

To check which nginx processes are running try:

http://localhost:8080

pgrep nginx

To see more clearly what these processes are:

ps waux | grep nginx ... root 91487 0.0 0.0 2463900 436 ... nginx: master process nginx ...

to tell you if nginx is still running, and

lsof -i 4tcp | grep 8080

will tell you which process is holding the 8080 port if it's not nginx.

And you can kill the master process manually with (replace 91728 and enter the pid from the results above):

kill -QUIT 91728