Linux – Start, Stop, Restart Nginx WebServer

You can start,stop and restart Nginx web server by issuing any of the following commands from your terminal as a root user.

Based on your Linux flavor and Nginx installed location there will be little changes need,but most of the times below commands should work without any changes.

You can use following command to start,stop and restart Nginx sever. Following commands should work with any Linux distributions or Unix like operating systems:

Generally we use reload command for reloading Nginx server after making any changes to the Nginx configuration file such as nginx.conf.

In my case, I have compiled and installed nginx from source code at /usr/local/nginx/sbin/nginx. So to start,stop and restart my web server I need to execute following commands –

Thanks for reading…

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun
I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.
DMCA.com Protection Status