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 > Servers >
Share
Shulou(Shulou.com)06/02 Report--
[TOC]
Nginx A brief introduction to a high-performance, lightweight Web service software with high stability and low system resource consumption The ability to handle HTTP concurrent connections is high 2, Nginx configuration 2.1, installation dependency package and decompression 2.2, configuration compilation installation 2.3, production management script 2.4, modification of nginx.conf file 2.5, configuration DNS domain name resolution 3, access control 3.1, authorization-based access control 3.2, client-based access control 1, Nginx introduction to a high-performance, lightweight Web service software with high stability Low consumption of system resources, high processing capacity for HTTP concurrent connections, and installation packages that need to be prepared for Nginx configuration: you can first mount the compressed package from the Windows system to the linux system by remote mount, and then carry out compression and other operations. 2.1. install and extract the dependency package in a centos7 system with IP address 192.168.111.141. 1. Install the dependency package
2. Create a user named nginx, and do not allow login to the system
3. Mount and unzip the installation package to the specified / opt/
2.2, configuration compilation and installation 1, compilation configuration
2. Make compilation
3. Turn off the firewall and optimize the path
4. Check to see if there is any error
5. Install the elinks installation package and test it with elinks
Nginx-t / / check nginx / / start killall-1 nginx / / reload killall-3 nginx / / stop
2.3. make management script 1, make management script to control the opening and closing of Nginx.
2. Add execution permissions and add script files to the list of services
2.4.The modification of nginx.conf file is in the main configuration file / usr/local/nginx/conf/nginx.conf of Nginx server, including global configuration, Icano event configuration and HTTP configuration.
1. Global configuration
2. Icano event configuration
3. HTTP configuration
Access status statistics nginx has a built-in HTTP_STUB_STATUS status statistics module, which is used to feedback the current Web access.-- with-http_stub_status_module can be added when configuring compilation parameters to enable this module support. You can use the command: / usr/local/nginx/sbin/nginx-V to see if the installed Nginx contains the HTTP_STUB_STATUS module. To use the state statistics feature of Nginx, in addition to enabling the built-in module, you need to modify the nginx.conf configuration file, specify the access location, and add the stub_status configuration code. Modify only the server {} area in the nginx.conf configuration file:
After modifying the configuration file, restart the service.
2.5. configure DNS domain name resolution 1. Install
2. Modification
3. Start the named service
Modify the address of the DNS server in the client of a win10 system
Enter www.king.com/status in the browser of win10
Third, access control 3.1.Authorization-based access control Nginx, like Apache, can implement authorization-based access control. When the client wants to visit the website, it will require to enter a user name and password before it can be accessed normally. The configuration steps are basically the same as Apache. The idea of access control configuration based on authorization is to generate a user password authentication file to modify the main configuration file to the corresponding directory, add authentication configuration items to restart services, access test 1, modify the main configuration file nginx.conf, and add corresponding authentication configuration items.
Install the tools package
The htpasswd command generates a user authentication file
3. If you modify the configuration file, you must restart the service.
4. When you use win10's browser to access the URL www.king.com, you will be asked to enter the user name wanglu and password 123123
3.2.The client-based access control can decide whether to allow access to the page through the IP address of the client. The rules are as follows: deny ip/ip segment: deny access to an ip or IP segment; allow ip/ip segment: allow access to an ip or IP segment. Rules: from top to bottom, if matching, stop, no longer match my win10 host IP address is 192.168.111.140 configuration process: 1, modify the main configuration file nginx.conf, add the corresponding authentication configuration items.
2. If you modify the configuration file, you must restart the service.
3. Verify in win10 system:
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.