nginx common commands put into shell script details

  • 2021-10-16 05:28:35
  • OfStack

1. Create a folder to store shell scripts for nginx


1) Restart the shell script for nginx

nginx -s reload

2) The shell script that sets the nginx user's permission to read and write all files in the html directory

setfacl -m u:nginx:rwx -R /usr/local/nginx/html/
setfacl -m d:u:nginx:rwx -R /usr/local/nginx/html/

3) The shell script to start the nginx process


4) Stop the shell script of the nginx process

nginx -s stop

2. Use

1) Add execution permission to shell file script of nginx

chmod -R 755 /usr/local/task/nginx

2) Execute the start. sh script


Related articles: