Home  >  Article  >  Operation and Maintenance  >  How to start and restart nginx in Linux system

How to start and restart nginx in Linux system

WBOY
WBOYforward
2023-05-12 13:19:131741browse

1. Enter the sbin directory under the nginx installation directory.

2. Execute the following command:

./nginx -c /usr/local/nginx/nginx/conf/nginx. conf

● Where/usr/local/nginx/nginx/conf/nginx.conf is your own nginx.conf path. ●The -c parameter specifies the path to the nginx configuration file to be loaded.

How to restart nginx in linux?

Restart smoothly:

1. Enter the sbin directory under the nginx installation directory

2. Execute the following command:

./nginx -s reload

How to stop nginx in linux?

1. Enter the sbin directory under the nginx installation directory

2. Execute the following command:

./nginx -s stop

The above is the detailed content of How to start and restart nginx in Linux system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete