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 Write docker-compose.yml Run do...
Install Apache from source 1. Upload the Apache s...
Recently, I encountered the need to embed a player...
1. First find the Data file on the migration serv...
Find the installation directory of VirtualBox. Th...
How to view version information under Linux, incl...
Resource merging and compression for two purposes...
The width of the parent container is fixed. In or...
How PHP works First, let's understand the rel...
The image can be easily pushed directly to the Do...
1. Problem There is a table as shown below, we ne...
<br />The header refers to the first row of ...
MySQL is the most commonly used database. You mus...
<br />What principles should be followed to ...
Today, when I logged into the company's inter...