1. Create a folder to store nginx shell scripts/usr/local/task/nginx 1) Restart nginx shell script #!/bin/bash nginx -s reload 2) Set the shell script for the nginx user to read, write and execute permissions for all files in the html directory #!/bin/bash setfacl -mu:nginx:rwx -R /usr/local/nginx/html/ setfacl -md:u:nginx:rwx -R /usr/local/nginx/html/ 3) Shell script to start the nginx process #!/bin/bash nginx 4) Shell script to stop nginx process #!/bin/bash nginx -s stop 2. Use1) Add execution permissions to the nginx shell script chmod -R 755 /usr/local/task/nginx 2) Execute the start.sh script /usr/local/task/nginx/start.sh This is the end of this article about the detailed explanation of putting commonly used nginx commands into shell scripts. For more relevant content about putting nginx commands into shell scripts, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: MySQL implements string concatenation, interception, replacement, and position search operations
>>: Vue implements the digital thousands separator format globally
Table of contents vite function Use Environment B...
Introduction The Docker community has created man...
I remember when I was interviewing for my current...
As more and more Docker images are used, there ne...
1. Error error connecting to master 'x@xxxx:x...
Preface In daily development, we often need to pe...
Table of contents 1 Review 2 Five strategies for ...
Please handle basic operations such as connecting...
Table of contents 0. What is Webpack 1. Use of We...
Recently, I encountered a problem of whether the d...
Table of contents 1. v-if 2. Use v-if on <temp...
Before introducing the GROUP BY and HAVING clause...
1. Basic Environment 1. Operating system: CentOS ...
I have seen a lot of MySQL-related syntax recentl...
This article example shares the specific code of ...