current location:Home > Technical Articles > Operation and Maintenance > Nginx
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to use nginx for load balancing
- Four-layer load balancing vs seven-layer load balancing. It is often said that seven-layer load balancing or four-layer load balancing is actually decided based on the name of the layer of the iso osi network model. nginx uses the http protocol to load the application layer. Balanced operation, so it is called seven-layer load balancing. For example, lvs that performs load balancing operations on the tcp layer is called layer 4 load balancing. Generally speaking, there are the following load balancing classifications: Common software support Common load balancing algorithms Common load balancing algorithms include the following: Load balancing demonstration example: ordinary polling Next, use nginx to demonstrate how to perform ordinary polling. : Prepare in advance to start two services on the two ports 7001/7002 for display.
- Nginx 1962 2023-06-03 08:19:12
-
- How to configure nginx to ensure that the frps server and web share port 80
- First of all, you will have a doubt, what is frp? Simply put, frp is an intranet penetration tool. After configuring the client, you can access the intranet through the server. Now my server has used nginx as the website, and there is only one port 80. So what should I do if the FRP server also wants to use port 80? After querying, this can be achieved by using nginx's reverse proxy. To add: frps is the server, frpc is the client. Step 1: Modify the nginx.conf configuration file in the server and add the following parameters to http{} in nginx.conf, server{listen80
- Nginx 1170 2023-06-03 08:19:08
-
- Analysis of Nginx common configuration examples
- Block IP You can block the specified IP through deny http{#....#Block IPdeny192.168.4.3;deny31.42.145.0/24;deny51.12.35.0/24;}Only to open the intranet, you need to prohibit 192.168.1.1 from being opened first Other intranet segments, and then prohibit all other IPlocation/{#blockoneworkstationdeny192.168.1.1;#allowanyonein192.168.1.0/24allow192.168.1.0/24;#droprestoftheworlddenyall;} negative
- Nginx 1337 2023-06-02 23:14:50
-
- How to install and configure Lua support for Nginx
- Nginx installation and configuration Lua support By default, Nginx does not support Lua modules. You need to install the LuaJIT interpreter and recompile Nginx, or you can use the modules required by openrestry developed by Chinese people: LuaJIT, Ngx_devel and lua-nginx-module1. Environment preparation [root @nginx_lua~]#yuminstall-ygccgcc-c++makepcre-develzlib-developenssl-devel2. Download the latest luajit and ngx_devel_kit and lua-nginx-module decompression [r
- Nginx 2330 2023-06-02 22:01:10
-
- How to configure Nginx multiple domain names under windows
- 1. The directory structure for installing nginx under windows is as follows: 2. Contents of conf/nginx.conf in the nginx-1.12.1 directory #usernobody;worker_processes1;events{worker_connections1024;}http{includemime.types;default_typeapplication/octet-stream;sendfileon ;keepalive_timeout65;server{listen80default_server;server_n
- Nginx 2019 2023-06-02 21:43:54
-
- How to implement nginx reverse proxy in Centos7
- The reverse proxy server is set up on the server side to relieve the workload of the server by buffering frequently requested pages, forwarding client requests to the target server on the internal network; and returning the results obtained from the server to the Internet to request a connection. At this time, the proxy server and the target host appear as a server to the outside world. Currently, web websites use reverse proxies, which in addition to preventing vicious attacks from the external network on internal servers, caching to reduce server pressure and access security control. Experimental environment: 192.168.1.188nginx load balancer 192.168.1.189web01 server 192.168.1.190web02 server software preparation: cen
- Nginx 1134 2023-06-02 20:16:01
-
- How to solve the problem of 499 and failover mechanism failure caused by improper nginx configuration
- The meaning and possible reasons of 499. 499 is not actually the standard status code of the HTTP protocol, but a custom status code of nginx. I have not found a clear explanation of this status code in the official nginx documentation. Here is a blog post that feels more professional. Explanation on: HTTPerror499simplymeansthattheclientshutoffinthemiddleofprocessingtherequestthroughtheserver.The499errorcodeputsbetterlightthatsomethinghappenedwiththeclien
- Nginx 1688 2023-06-02 19:54:24
-
- What is the reason why docker uses daemon off when running nginx?
- Question 1. Why does the docker container hang when it is running? By default, the docker container will use the first process inside the container, that is, the program with pid=1, as the basis for whether the docker container is running. If the docker container pid hangs, the docker container will exit directly. 2. When docker runs, use command as the internal command of the container. If you use nginx, then the nginx program will run in the background. At this time, nginx is not the program with pid 1, but the executed bash. This bash will hang after executing the nginx command. , so the container also exited. The same reason as yours. After pm2start, bash
- Nginx 3691 2023-06-02 19:32:13
-
- How to configure the specified save file name for file download in nginx
- Generally, after we upload the resource file, in order to avoid file name conflicts, we will change the file name to a meaningless period of characters. This character may be generated by md5, or a string generated by other methods. At this time, when downloading, the file name saved by default will be this meaningless file name (Figure 1). In fact, nginx supports renaming during downloading, making the file name more friendly. nginx is also easy to configure: just add the following lines: Copy the code The code is as follows: location~*.*\.(doc|txt|jar|zip|apk)(\?.*)?${if($request_uri ~*^.*\/(.*)\.(doc|txt|jar
- Nginx 1730 2023-06-02 16:04:06
-
- How does Nginx configure a site with multiple domain names?
- A site is configured with multiple domain names server{listen80;server_nameops-coffee.cnb.ops-coffee.cn;}server_name followed by multiple domain names, separated by spaces.
- Nginx 1242 2023-06-02 15:34:13
-
- How does nginx enable one server to access multiple websites?
- On a server, there are usually two ways to distinguish between accessing different websites: 1. Through the listening port number 2. Through the domain name 1. Accessing different hosts through the port: nginx configuration file: /usr/local/nginx/conf /nginx.confcentos file default encoding format latin1 Command to view the encoding format: :setfileencoding#usernobody;worker_processes1;#error_loglogs/error.log;#error_loglogs/error.lognotice;#error_loglogs/error
- Nginx 2841 2023-06-02 14:16:06
-
- How to configure Nginx current limiting
- For the empty bucket, we start with the simplest current limiting configuration: limit_req_zone$binary_remote_addrzone=ip_limit:10mrate=10r/s;server{location/login/{limit_reqzone=ip_limit;proxy_passhttp://login_upstream;}}$binary_remote_addr for client ip limit flow; zone=ip_limit: The name of the 10m current limit rule is ip_limit, which allows the use of 10mb of memory space to record the current limit status corresponding to the ip; rate=
- Nginx 2003 2023-06-02 13:10:06
-
- What is the source code of nginx thread pool?
- 1. Task node typedefvoid(*cb_fun)(void*);//Task structure typedefstructtask{void*argv;//Parameters of the task function (before the task execution ends, ensure that the parameter address is valid) cb_funhandler;//Task function ( The return value must be 0 and non-zero values are used to add threads and destroy thread pools) structtask*next;//task chain pointer}zoey_task_t; handler is a function pointer, which is the actual task function, argv is the parameter of the function, and next points to Next task. 2.Task queue typedefstructt
- Nginx 1235 2023-06-01 22:20:29
-
- Analysis of simple installation examples of Nginx under centos6.5
- 1. Configure the yum source: Create the file: /etc/yum.repos.d/nginx.repotouch/etc/yum.repos.d/nginx.repo Edit the file, vi/etc/yum.repos.d/nginx.repo Write the following content: [nginx]name=nginxrepobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1 Save. The yum source configuration is completed. You can use the following command to check whether the yum source is configured correctly
- Nginx 1256 2023-06-01 21:07:22
-
- How do websites set black/whitelist IP restrictions and country and city IP access restrictions through nginx?
- 1. Black/white list IP restricted access configuration nginx There are several ways to configure black and white lists. Here are only two commonly used methods. 1. The first method: allow, denydeny and allow instructions belong to ngx_http_access_module. nginx loads this module by default, so it can be used directly. This method is the simplest and most direct. The setting is similar to the firewall iptable. How to use: Add directly to the configuration file: #Whitelist settings, followed by allow is accessible IPlocation/{allow123.13.123.12;allow23.53.32.1/100;denyall;}#Blacklist settings,
- Nginx 3543 2023-06-01 17:27:30