当前位置:网站首页>Ningx 1.20.2
Ningx 1.20.2
2022-06-30 17:11:00 【Eternal wolf tooth】
1、 download
Stable version , Download the corresponding linux Version or windows edition . Download address 
2、windows Installation in environment
- decompression : Directly decompress the downloaded compressed package , Cannot unzip in a folder containing a Chinese path , Otherwise it won't start .
- start-up : Direct double click nginx.exe Or on the command line nginx.exe You can start
- test : Browser access http://localhost:80, The following page appears, and the startup is successful .

- Common commands
nginx -s stop Fast closing Nginx, Information may not be saved , And quickly terminate web service .
nginx -s quit Close smoothly Nginx, Keep relevant information , There's an end to the arrangement web service .
nginx -s reload Because of the change Nginx Related configuration , Need to reload configuration and reload .
nginx -s reopen Reopen the log file .
nginx -c filename by Nginx Specify a profile , Instead of the default .
nginx -t Not running , Just test the configuration file .nginx The syntax of the configuration file will be checked for correctness , And try to open the file referenced in the configuration file .
nginx -v Show nginx Version of .
nginx -V Show nginx Version of , Compiler version and configuration parameters .
3、 Load balancing

upstream mysvr {
server 192.168.10.121:3333;
server 192.168.10.122:3333;
}
server {
....
location ~*^.+$ {
proxy_pass http://mysvr; # Request turn mysvr List of defined servers
}
}
- Hot standby : If you have 2 Servers , When a server crashes , To enable the second server to provide services .
upstream mysvr {
server 127.0.0.1:7878;
server 192.168.10.121:3333 backup; # Hot standby
}
- polling :nginx The default is that the polling weights are all defaulted to 1, The order in which the server processes requests :ABABABABAB…
upstream mysvr {
server 127.0.0.1:7878;
server 192.168.10.121:3333;
}
- Weighted polling : Different number of requests are distributed to different servers according to the configured weight . If not set , The default is 1. The request order of the following servers is :ABBABBABBABBABB…
upstream mysvr {
server 127.0.0.1:7878 weight=1;
server 192.168.10.121:3333 weight=2;
}
- ip_hash:nginx Will make the same client ip Request the same server .
upstream mysvr {
server 127.0.0.1:7878;
server 192.168.10.121:3333;
ip_hash;
}
About nginx Several state parameters of load balancing configuration :
- down, Represents the current server Do not participate in load balancing temporarily .
- backup, Reserved backup machine . When everything else is not backup When the machine breaks down or is busy , Only request backup machine , So this machine has the least pressure .
- max_fails, Number of requests allowed to fail , The default is 1. When the maximum number of times is exceeded , return proxy_next_upstream Module definition error .
- fail_timeout, After going through max_fails After failure , Time out of service .max_fails You can talk to fail_timeout Use it together .
upstream mysvr {
server 127.0.0.1:7878 weight=2 max_fails=2 fail_timeout=2;
server 192.168.10.121:3333 weight=1 max_fails=2 fail_timeout=1;
}
4、linux Installation and deployment under the system ( To be added ...)
边栏推荐
- jspreadsheet/CE JExcel数据字段比给的字段(columns)多会导致空白列的问题解决方案
- 每日刷题记录 (九)
- 利用PIL进行不失真的resize
- Wechat emoticons are written into the judgment, and the OK and bomb you send may become "testimony in court"
- Redis data structure analysis
- 华为帐号多端协同,打造美好互联生活
- Niuke network: longest continuous subarray with positive product
- JS Es5 can also create constants?
- Internet R & D efficiency practice qunar core field Devops landing practice
- 列表变成向量 列表变向量 list vector
猜你喜欢

编译丨迅为STM32P157开发板编译U-Boot源码

List announced - outstanding intellectual property service team in China in 2021

flutter自定义组件

MC Instruction Decoder

Etcd教程 — 第九章 Etcd之实现分布式锁

Required plug-ins for idea
![[Verilog basics] summary of some concepts about clock signals (clock setup/hold, clock tree, clock skew, clock latency, clock transition..)](/img/54/fd7541dae4aad7e4216bcaabbb146b.png)
[Verilog basics] summary of some concepts about clock signals (clock setup/hold, clock tree, clock skew, clock latency, clock transition..)

Data security compliance has brought new problems to the risk control team

Mathematical modeling for war preparation 34-bp neural network prediction 2

More dragon lizard self-developed features! Production available Anolis OS 8.6 officially released
随机推荐
华为帐号多端协同,打造美好互联生活
每日刷题记录 (九)
simpleITK读取nii遇到ITK only supports orthonormal direction cosines的错误
redis数据结构分析
Deep learning - (2) several common loss functions
addmodule_allmerge_ams_im
补充材料 supplementary
The 25th anniversary of Hong Kong's return to China the Hong Kong Palace Museum officially opened as a new cultural landmark
More than 20million videos have been played in the business list! Why is the reform of Agricultural Academies urged repeatedly?
Mathematical modeling for war preparation 33- grey prediction model 2
SSH tool pyqt
restartProcessIfVisible的流程
Several cross end development artifacts
Delete duplicates in an ordered array ii[double pointers -- unified in multiple cases]
商鼎云新版来袭 | 收藏夹功能已上线,满足个人使用需求
differential analysis between different groups nichenet for silicosis成功运行!
[Demo] 循环写文件
Mathematical modeling for war preparation 34-bp neural network prediction 2
异常类_日志框架
名单揭晓 | 2021年度中国杰出知识产权服务团队