In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This issue of the content of the editor will bring you about the Nginx configuration-related structure division skills, the article is rich in content and professional analysis and description for you, I hope you can get something after reading this article.
Nginx configuration requires some skills, which we will find in continuous use and maintenance. Next, we will introduce some skills related to Nginx configuration. My current Nginx configuration is fragmented, which makes it easy to reuse parts of the configuration in many virtual hosts and directories.
In general, it is divided into such a structure:
Conf/ conf/Nginx.conf conf/proxy.conf conf/rewrite.conf conf/location.conf conf/port.conf conf/upstream.conf conf/servers/ conf/servers/www.sudone.com conf/servers/www.163.com
1 、 Nginx.conf
This is the master file read by the Nginx configuration, and no special case is universal.
2 、 proxy.conf
The option configuration of the agent is also universal.
3 、 rewrite.conf
The rewrite rule, which is common to the root directory of all hosts, defaults to empty files and may not be used.
4 、 location.conf
All hosts will use the location directory structure, the default is empty files, can not be used.
5 、 port.conf
The configuration server binds ip and port, because the Nginx configuration will have bug if the ip port configuration of each host is different, so * * is set uniformly.
6 、 upstream.conf
Upstream is written here, separate from the business and easy to control.
7. Servers directory
Under this directory are all the virtual host configurations, one file for each virtual host, and the Nginx.conf goes to include, which makes it flexible to deal with these configurations. Several common configurations can be downloaded here with comments:
Nginx.conf proxy.conf
An example of the entire framework can be downloaded from the rar package: Nginx.conf.rar.
The above is the editor for you to share the Nginx configuration-related structure division skills, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.