1. There are multiple servers in the actual project deployment, so be sure to pay attention to which server nginx is deployed on. Use systemctl status nginx.service to view the running status
Running:
closed:
2. View the file directory
a. View nginx installation directory
ps -ef | grep nginx
b. View the path of the configuration file nginx.conf
nginx -t
c. Find command to search for files
## Search from etc directory
find ./etc -name nginx.conf
3. Start and shut down
service nginx start
service nginx stop
service nginx restart
service nginx reload
4. Edit
vim nginx.conf
iStart editing
esc stops editing
ctrl + i Command line input wq! Save and exit q! Do not save and exit