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!