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
You may often see some HTML with data attributes. ...
Install GeoIP on Linux yum install nginx-module-g...
As a programmer who has just learned Tomcat, this...
1. Install MySQL software Download and install My...
It is essentially a common js object used to desc...
Introduction to MySQL Window Functions MySQL has ...
Preface During the development process, we often ...
I joined a new company these two days. The compan...
This article refers to the work of 51CTO blog aut...
1. Open the virtual machine and git bash window a...
Horizontal scrolling isn’t appropriate in all situ...
Since I used this plugin when writing a demo and ...
Sometimes you need to debug remotely in a server ...
Scenario: When starting tomcat in docker (version...
1. Check the synchronization status of A and B da...