0 votes
45 views
in Nginx by

I want to know all important nginx commands which we used with ubuntu.

1 Answer

0 votes
by (5k points)

If you want to install nginx in your machine then follow the following steps:-

To install nginx on Debian/Ubuntu, you can use the following command:

apt-get install nginx

To install nginx on CentOS and RHEL, you can use the following command:

yum install nginx

If you want to start nginx server, it is very simple if you are using init.d scripts:

service nginx start

If you want to stop nginx server, it is very simple if you are using init.d scripts:

service nginx stop

Nginx servers are busy, it can take a few seconds. If you want a more aggressive kill, you can use following command:

killall -9 nginx

To restart nginx server use following command:-

service nginx restart

Output example:-

Stopping nginx:                                            [  OK  ]

Starting nginx:                                            [  OK  ]

If you want to reload nginx server, you can use following command:-

service nginx reload

Output example:-

Reloading nginx:                                           [  OK  ]

Share:- Whatsapp Facebook Facebook


Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.

Categories

...