Nginx 笔记_nginx最全教程
off999 2025-09-19 00:33 16 浏览 0 评论
gcc
# 可能需要安装C++
yum -y install gcc-c++
install nginx by bash
cd /usr/local/src
#
# @see http://nginx.org/en/download.html
#
wget http://nginx.org/download/nginx-1.15.11.tar.gz
tar -xzvf nginx-1.15.11.tar.gz
#
# @see http://www.pcre.org/
#
wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
tar -xzvf pcre-8.43.tar.gz
#
# @see https://www.openssl.org/source/
#
wget https://www.openssl.org/source/openssl-1.0.2r.tar.gz
tar -xzvf openssl-1.0.2r.tar.gz
#
# @see http://www.zlib.net/
#
wget http://www.zlib.net/zlib-1.2.11.tar.gz
tar -xzvf zlib-1.2.11.tar.gz
# 重点来了!!!
cd nginx-1.15.11
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-pcre=../pcre-8.43 \
--with-zlib=../zlib-1.2.11 --with-openssl=../openssl-1.0.2r
make && make install
test -e /usr/bin/nginx || ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx
install nginx by bash with versioning
cd /usr/local/src
nginx_version=1.16.1
pcre_version=8.43
openssl_version=1.1.1d
zlib_version=1.2.11
#
# @see http://nginx.org/en/download.html
#
wget http://nginx.org/download/nginx-${nginx_version}.tar.gz
tar -xzvf nginx-${nginx_version}.tar.gz
#
# @see http://www.pcre.org/
#
wget https://ftp.pcre.org/pub/pcre/pcre-${pcre_version}.tar.gz
tar -xzvf pcre-${pcre_version}.tar.gz
#
# @see https://www.openssl.org/source/
#
wget https://www.openssl.org/source/openssl-${openssl_version}.tar.gz
tar -xzvf openssl-${openssl_version}.tar.gz
#
# @see http://www.zlib.net/
#
wget http://www.zlib.net/zlib-${zlib_version}.tar.gz
tar -xzvf zlib-${zlib_version}.tar.gz
# 重点来了!!!
cd nginx-${nginx_version}
./configure --prefix=/usr/local/nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-pcre=../pcre-${pcre_version} \
--with-zlib=../zlib-${zlib_version} \
--with-openssl=../openssl-${openssl_version}
make && make install
test -e /usr/bin/nginx || ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx
# nginx user
# useradd -M -s /sbin/nologin nginx
install nginx with lua
结论:直接使用 OpenResty[1]
lua-nginx-module[2]
dynamic-nginx-upstreams-with-lua-and-redis[3]
installation[4]
########################### Download ###########################
wget -O "luajit2-v2.1-20200102.tar.gz" https://github.com/openresty/luajit2/archive/v2.1-20200102.tar.gz
wget -O "ngx_devel_kit-v0.3.1.tar.gz" https://github.com/vision5/ngx_devel_kit/archive/v0.3.1.tar.gz
wget -O "lua-nginx-module-v0.10.17.tar.gz" https://github.com/openresty/lua-nginx-module/archive/v0.10.17.tar.gz
nginx_version=1.17.8
pcre_version=8.43
openssl_version=1.1.1d
zlib_version=1.2.11
#
# @see http://nginx.org/en/download.html
#
wget http://nginx.org/download/nginx-${nginx_version}.tar.gz
tar -xzvf nginx-${nginx_version}.tar.gz
#
# @see http://www.pcre.org/
#
wget https://ftp.pcre.org/pub/pcre/pcre-${pcre_version}.tar.gz
tar -xzvf pcre-${pcre_version}.tar.gz
#
# @see https://www.openssl.org/source/
#
wget https://www.openssl.org/source/openssl-${openssl_version}.tar.gz
tar -xzvf openssl-${openssl_version}.tar.gz
#
# @see http://www.zlib.net/
#
wget http://www.zlib.net/zlib-${zlib_version}.tar.gz
tar -xzvf zlib-${zlib_version}.tar.gz
########################### 安装 LuaJIT ###########################
cd luajit2-v2.1-20200102
make install PREFIX=/usr/local/LuaJIT
###
########################### make-nginx.sh ###########################
nginx_version=1.17.8
pcre_version=8.43
openssl_version=1.1.1d
zlib_version=1.2.11
# 重点来了!!!
cd nginx-${nginx_version}
# tell nginx's build system where to find LuaJIT 2.1:
export LUAJIT_LIB=/usr/local/LuaJIT/lib
export LUAJIT_INC=/usr/local/LuaJIT/include/luajit-2.1
./configure --prefix=/usr/local/nginx \
--with-ld-opt="-Wl,-rpath,/usr/local/LuaJIT/lib" \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-pcre=../pcre-${pcre_version} \
--with-zlib=../zlib-${zlib_version} \
--with-openssl=../openssl-${openssl_version} \
--add-module=../ngx_devel_kit-0.3.1 \
--add-module=../lua-nginx-module-0.10.17
make
########################### install-nginx.sh ###########################
nginx_version=1.17.8
pcre_version=8.43
openssl_version=1.1.1d
zlib_version=1.2.11
# 重点来了!!!
cd nginx-${nginx_version}
make install
########################### 最后的最后 ###########################
# 启动 nginx 出错:
#nginx: [alert] failed to load the 'resty.core' module (https://github.com/openresty/lua-resty-core); ensure you are using an #OpenResty release from https://openresty.org/en/download.html (reason: module 'resty.core' not found:
# no field package.preload['resty.core']
# no file './resty/core.lua'
# no file '/usr/local/LuaJIT/share/luajit-2.1.0-beta3/resty/core.lua'
# no file '/usr/local/share/lua/5.1/resty/core.lua'
# no file '/usr/local/share/lua/5.1/resty/core/init.lua'
# no file '/usr/local/LuaJIT/share/lua/5.1/resty/core.lua'
# no file '/usr/local/LuaJIT/share/lua/5.1/resty/core/init.lua'
# no file './resty/core.so'
# no file '/usr/local/lib/lua/5.1/resty/core.so'
# no file '/usr/local/LuaJIT/lib/lua/5.1/resty/core.so'
# no file '/usr/local/lib/lua/5.1/loadall.so'
# no file './resty.so'
# no file '/usr/local/lib/lua/5.1/resty.so'
# no file '/usr/local/LuaJIT/lib/lua/5.1/resty.so'
# no file '/usr/local/lib/lua/5.1/loadall.so') in /usr/local/nginx/conf/nginx.conf:121
# 根据上面的错误提示下载下面的包
wget https://openresty.org/download/openresty-1.17.8.1.tar.gz
# 复制 lua-resty-core-0.1.19 及 lua-resty-lrucache-0.10 中的库到 /usr/local/LuaJIT/share/lua/5.1/
install nginx with njs
Building from the sources[5]
njs_version=0.4.1
wget -O "njs-${njs_version}.tar.gz" http://hg.nginx.org/njs/archive/${njs_version}.tar.gz
tar -xzvf njs-${njs_version}.tar.gz
########################### make-nginx.sh ###########################
nginx_version=1.16.1
pcre_version=8.43
openssl_version=1.1.1d
zlib_version=1.2.11
njs_version=0.4.1
# 重点来了!!!
cd nginx-${nginx_version}
./configure --prefix=/usr/local/nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-pcre=../pcre-${pcre_version} \
--with-zlib=../zlib-${zlib_version} \
--with-openssl=../openssl-${openssl_version} \
--add-dynamic-module=../njs-${njs_version}/nginx
make
########################### install-nginx.sh ###########################
nginx_version=1.16.1
pcre_version=8.43
openssl_version=1.1.1d
zlib_version=1.2.11
# 重点来了!!!
cd nginx-${nginx_version}
make install
install nginx with stream
########################### make-stream-nginx.sh ###########################
nginx_version=1.21.1
pcre_version=8.43
openssl_version=1.1.1d
zlib_version=1.2.11
# 重点来了!!!
cd nginx-${nginx_version}
./configure --prefix=/usr/local/stream_nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-openssl-opt=enable-weak-ssl-ciphers \
--with-pcre=../pcre-${pcre_version} \
--with-zlib=../zlib-${zlib_version} \
--with-openssl=../openssl-${openssl_version} \
--with-stream \
--with-stream_ssl_module
make
sftp
假定出口 ip 固定为 192.168.1.2,则可以利用 Nginx Stream 进行代理。
stream {
upstream sftp-01 {
server 192.168.1.100:22;
}
upstream sftp-02 {
server 192.168.1.101:22;
}
server {
listen 10508;
proxy_bind 192.168.1.2;
proxy_pass sftp-01;
}
server {
listen 10509;
proxy_bind 192.168.1.2;
proxy_pass sftp-02;
}
}
start nginx
# 开启端口(permanent永久)
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
# 重启firewall生效
firewall-cmd --reload
# 查看开启的端口
firewall-cmd --list-ports
# 符号链接
test -e /usr/bin/nginx || ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx
# start
nginx
nginx systemd service file
nginx systemd service file[6]
The location of the PIDFile and the NGINX binary may be different depending on how NGINX was compiled.
Save this file as /lib/systemd/system/nginx.service
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStartPre=/usr/local/nginx/sbin/nginx -t
ExecStart=/usr/local/nginx/sbin/nginx
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
# 开机启动
systemctl enable nginx
# 立即启动
systemctl start nginx
add module
以--with-stream=dynamic为例,--add-module类似
#
# 查看nginx详细安装信息
#
nginx -V
# nginx version: nginx/1.15.11
# built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
# built with OpenSSL 1.0.2r 26 Feb 2019
# TLS SNI support enabled
# configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --with-http_sub_module \
# --with-http_gzip_static_module --with-http_stub_status_module \
# --with-pcre=../pcre-8.43 --with-zlib=../zlib-1.2.11/ --with-openssl=../openssl-1.0.2r
#
# whereis nginx 查看本机是否存在nginx源码目录
# 若没有,下载对应版本的源,如nginx
# cd /usr/local/src
# nginx_version=1.15.11
# wget http://nginx.org/download/nginx-${nginx_version}.tar.gz
#
cd /usr/local/src/nginx-1.15.11
# 将配置输出到ngx_config.sh
nginx -V 2>&1 | awk '{print $0}' > ngx_config.sh
# --with-stream=dynamic
vim ngx_config.sh
#./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_sub_module \
# --with-http_gzip_static_module --with-http_stub_status_module \
# --with-pcre=../pcre-8.43 --with-zlib=../zlib-1.2.11/ --with-openssl=../openssl-1.0.2r --with-stream=dynamic
chmod 755 ngx_config.sh
bash ngx_config.sh
# 只执行make
make
# copy
cp /usr/local/nginx/sbin/nginx{,.bak}
cp ./objs/nginx /usr/local/nginx/sbin/
cp ./objs/ngx_stream_module.so /usr/local/nginx/modules/
# 编辑nginx.conf
vim /usr/local/nginx/conf/nginx.conf
# 顶层添加如下指令
# load_module modules/ngx_stream_module.so;
# 重新加载配置
nginx -s reload
clean nginx log
# pwd
cd /usr/local/nginx
clean script
vim clean_access_log.sh
#! /bin/bash
NGINX_LOG_DIR="/usr/local/nginx/logs"
cat /dev/null > ${NGINX_LOG_DIR}/access.log
cat /dev/null > ${NGINX_LOG_DIR}/company.access.log
cat /dev/null > ${NGINX_LOG_DIR}/show.access.log
cat /dev/null > ${NGINX_LOG_DIR}/api.access.log
#echo $(date '+%F %T') >> ${NGINX_LOG_DIR}/crontab.log
chmod 755 clean_access_log.sh
crontab
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# cron service
systemctl status crond
crontab -e
# 每天凌晨3点清理
0 3 * * * /usr/local/nginx/clean_access_log.sh
# 每隔30分钟
*/30 * * * * /usr/local/nginx/clean_access_log.sh
# 查看定时任务
crontab -l
# 重启生效
systemctl reload crond
configuration
proxy_cache
ngx_http_proxy_module[7]
nginx proxy_cache 缓存配置[8]
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'$request_time $upstream_response_time $upstream_addr $upstream_cache_status';
access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
resolver 223.5.5.5 114.114.114.114 8.8.8.8;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types application/json text/plain application/x-javascript application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary off;
# step 1: 配置 cache path
proxy_cache_path /usr/local/nginx/proxy_cache levels=1:2 keys_zone=static-cache:1024m max_size=100g inactive=30d;
js_import js/http.js;
js_set $summary http.summary;
upstream city-w-sites {
ip_hash;
server 192.168.1.68;
server 192.168.1.69;
server 192.168.1.120;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Real-IP $http_x_real_ip;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300;
proxy_pass http://city-w-sites;
}
location ~* \.(gif|jpg|jpeg|png|bmp|swf|svg|woff|woff2|eot|ttf|js|css)$ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300;
proxy_pass http://city-w-sites;
# step 2: 配置 proxy cache
proxy_cache static-cache;
proxy_cache_key $scheme$proxy_host$request_uri;
proxy_cache_valid 200 206 304 301 302 10d;
}
location = /summary {
default_type text/plain;
return 200 $summary;
}
location = /hello {
default_type text/plain;
js_content http.hello;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
learn nginx
Beginner’s Guide[9]
Starting, Stopping, and Reloading Configuration
To start nginx, run the executable file. Once nginx is started, it can be controlled by invoking the executable with the -s parameter. Use the following syntax:
nginx -s signal
Where signal may be one of the following:
- stop — fast shutdown
- quit — graceful shutdown
- reload — reloading the configuration file
- reopen — reopening the log files
For example, to stop nginx processes with waiting for the worker processes to finish serving current requests, the following command can be executed:
nginx -s quit
This command should be executed under the same user that started nginx. Changes made in the configuration file will not be applied until the command to reload configuration is sent to nginx or it is restarted. To reload configuration, execute:
nginx -s reload
Once the master process receives the signal to reload configuration, it checks the syntax validity of the new configuration file and tries to apply the configuration provided in it. If this is a success, the master process starts new worker processes and sends messages to old worker processes, requesting them to shut down. Otherwise, the master process rolls back the changes and continues to work with the old configuration. Old worker processes, receiving a command to shut down, stop accepting new connections and continue to service current requests until all such requests are serviced. After that, the old worker processes exit.
Resource
nginx location 中 uri 的截取[10]
关于一些对 location 认识的误区[11]
nginx 常用模块整理[12]
zabbix ZBX_NGINX[13]
如何监控 NGINX[14]
SSL under IE8/Windows XP with NGINX and OpenSSL[15]
nginx.conf
- ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
compile
- --with-openssl-opt=enable-weak-ssl-ciphers
agentzh 的 Nginx 教程[16]
imageproxy[17] A caching, resizing image proxy written in Go.
- nginx cache + imageproxy + minio 支持多级 cache 的图片缩放处理服务[18]
负载均衡[19]
zabbix
ZBX_NGINX[20]
docker
docker hub[21]
# nginx
mkdir /usr/local/nginx
# conf
mkdir /usr/local/nginx/conf
# logs
mkdir /usr/local/nginx/logs
# html
mkdir /usr/local/nginx/html
# vim /usr/local/nginx/conf/nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
配置文件中相对路径由 build 时确定,查看Building nginx from Sources[22]
docker run -d --name nginx7 \
-v /usr/local/nginx/conf/nginx.conf:/etc/nginx/nginx.conf \
-v /usr/local/nginx/logs:/etc/nginx/logs \
-v /usr/local/nginx/html:/etc/nginx/html \
-p 80:80 -p 443:443 \
nginx:1.17.9
mynginx
根据 showdoc[23] 的 Dockerfile
FROM richarvey/nginx-php-fpm:1.5.3
COPY ./ /var/www/html/
RUN apk update
RUN apk add openldap-dev
RUN docker-php-ext-install ldap
RUN chmod -R 777 /var/www/html/
RUN mkdir /showdoc_data
RUN mkdir /showdoc_data/html
RUN cp -R /var/www/html/ /showdoc_data/
CMD if [ ! -f "/var/www/html/index.php" ]; then \cp -fr /showdoc_data/html/ /var/www/ ;fi;chmod 777 -R /showdoc_data ;/start.sh
定制自己的 nginx Dockerfile,启动命令 CMD 可将容器内的复制文件复制到主机上
FROM nginx:1.17.9
RUN mkdir -p /tmp/nginx/conf
RUN cp -R /etc/nginx/* /tmp/nginx/conf
CMD if [ ! -f "/etc/nginx/nginx.conf" ]; then \cp -fr /tmp/nginx/conf/* /etc/nginx/;fi;chmod 777 -R /etc/nginx/; nginx -g 'daemon off;';
usage
# nginx 数据目录
mkdir /root/nginx/
# 注意 -v
docker run -d --name mynginx -v /root/nginx/conf:/etc/nginx/ -v /root/nginx/logs:/etc/nginx/logs -v /root/nginx/html:/etc/nginx/html -p 82:80 ringliwei/nginx:v1.3
nginx 配置文件(配置文件中相对路径由 build 时确定,查看Building nginx from Sources[24]
user nginx;
worker_processes 1;
error_log logs/error.log warn;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
# this is a moment
include conf.d/*.conf;
}
nginx-proxy
- nginx-proxy[25] Automated nginx proxy for Docker containers using docker-gen.
- Automated Nginx Reverse Proxy for Docker[26]
- jwilder/nginx-proxy[27]
CORS
location / {
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin '$http_origin';
add_header Access-Control-Allow-Credentials 'true';
add_header Access-Control-Allow-Methods '$http_access_control_request_method';
add_header Access-Control-Allow-Headers '$http_access_control_request_headers';
add_header Access-Control-Max-Age '2592000';
# OPTIONS
return 204;
}
add_header Access-Control-Allow-Origin '$http_origin';
add_header Access-Control-Allow-Credentials 'true';
proxy_pass http://web;
}
Problem
- 在 nginx 1.12.2 版本配置 upstream 时, 可以使用 upstream backend_service 这样的名称(包含下划线)来命名,但 nginx 1.16.1 命名 upstream 时由不能带下划线
- nginx proxy_pass to https[28] proxy_ssl_server_name on
引用链接
- [1] OpenResty: https://openresty.org/en/
- [2] lua-nginx-module: https://github.com/openresty/lua-nginx-module
- [3] dynamic-nginx-upstreams-with-lua-and-redis: https://sosedoff.com/2012/06/11/dynamic-nginx-upstreams-with-lua-and-redis.html
- [4] installation: https://github.com/openresty/lua-nginx-module#installation
- [5] Building from the sources: http://nginx.org/en/docs/njs/install.html
- [6] nginx systemd service file: https://www.nginx.com/resources/wiki/start/topics/examples/systemd/
- [7] ngx_http_proxy_module: http://nginx.org/en/docs/http/ngx_http_proxy_module.html
- [8] nginx proxy_cache 缓存配置: https://blog.csdn.net/ai2000ai/article/details/80485352
- [9] Beginner’s Guide: http://nginx.org/en/docs/beginners_guide.html
- [10] nginx location 中 uri 的截取: https://www.jianshu.com/p/849a6c068daa
- [11] 关于一些对 location 认识的误区: https://www.cnblogs.com/lidabo/p/4169396.html
- [12] nginx 常用模块整理: https://www.cnblogs.com/fangfei9258/p/9453709.html
- [13] zabbix ZBX_NGINX: https://github.com/AlexGluck/ZBX_NGINX
- [14] 如何监控 NGINX: https://linux.cn/article-5970-1.html
- [15] SSL under IE8/Windows XP with NGINX and OpenSSL: https://ablagoev.github.io/ssl/nginx/ie8/winxp/cipher/2016/12/23/ie8-winxp-nginx-ssl.html
- [16] agentzh 的 Nginx 教程: https://openresty.org/download/agentzh-nginx-tutorials-zhcn.html
- [17] imageproxy: https://github.com/willnorris/imageproxy
- [18] nginx cache + imageproxy + minio 支持多级 cache 的图片缩放处理服务: https://www.cnblogs.com/rongfengliang/p/13922297.html
- [19] 负载均衡: https://mp.weixin.qq.com/s/8y6IxIM8ApXakVjn8rx9aw
- [20] ZBX_NGINX: https://github.com/AlexGluck/ZBX_NGINX
- [21] docker hub: https://hub.docker.com/_/nginx
- [22] Building nginx from Sources: http://nginx.org/en/docs/configure.html
- [23] showdoc: https://hub.docker.com/r/star7th/showdoc/dockerfile
- [24] Building nginx from Sources: http://nginx.org/en/docs/configure.html
- [25] nginx-proxy: https://github.com/nginx-proxy/nginx-proxy
- [26] Automated Nginx Reverse Proxy for Docker: http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/
- [27] jwilder/nginx-proxy: https://hub.docker.com/r/jwilder/nginx-proxy
- [28] nginx proxy_pass to https: https://serverfault.com/questions/978922/nginx-proxy-pass-to-https
相关推荐
- 电脑装了两个系统怎么切换(电脑安装2个系统怎么更换启动)
-
1.点击运行打开电脑点击左下角的开始菜单栏选项,右击鼠标在序列栏中选择运行打开。2.输入msconfig接着在运行的输入框中输入msconfig点击确定即可打开系统配置。3.点击引导打开系统配置的页面...
- linux系统哪个版本好用(最好linux系统版本)
-
个人比较推荐Debian这个发行版本。DebianGNU/Linux于1993年首次公布,至今已经有近30年历史了。当然其他版本比如openSUSE,Slackware,ArchLinux,Ubu...
- win10激活在哪里查看(win10激活时间在哪里看)
-
在Windows10中,您可以通过以下方法查看激活状态:方法1:使用“设置”应用1.点击屏幕左下角的“开始”按钮,然后点击“设置”(齿轮图标)。2.在设置窗口中,点击“系统”图标。3.在“系统...
- 官方win10dll文件修复工具(官方win7dll文件修复工具)
-
当电脑丢失dll文件时,可以采用以下几种方法进行一键修复:从回收站还原:如果是不小心误删了一些计算机文件,导致电脑出现异常的情况时,首先就可以去回收站找回dll文件,如果文件还在,就可以通过还原操作来...
- qq所有历史旧版本大全(qq历史版本一览表)
-
有2种方法。一种是:你是QQ会员。你可以把旧版打开,聊天记录上传。然后打开新的QQ,下载。第2种是:你在硬盘上装了QQ软件,然后你就点卸载(uninst),把原来的卸了。然后按原位置覆盖,装上06版。...
- 电脑显示器分辨率怎么调(显示分辨率无法调整)
-
1、以win7为例,首先右键点击桌面,在右键菜单中直接显示了屏幕分辨率的选项,用鼠标点击一下这个选项。2、在分辨率设置选项页面中,有一个分辨率的选项,点击一下这个选项,上面默认显示的数值是你现在的屏幕...
- 8系统(8系统点检控制包含什么)
-
WIndows8系统是微软目前最新的操作系统,Moto的图形界面设计,使很多已经习惯于早期windows系统的用户难以接受,Windows8是一个向平板和桌面系统妥协的产物,存在着相当多的利弊。...
- 电脑软件管家(电脑软件管家在哪里找到)
-
电脑管家有着最大的安全云库,全新的杀毒引擎,深度清理电脑垃圾,为电脑重回巅峰状态,更有账号宝专版,10倍提升QQ防盗号能力,是很好用的。就自己而言,在电脑上用的是腾讯电脑管家这个第三方系统安全软件,管...
- 迅雷种子搜索器(迅雷种子搜索器手机版下载)
-
迅雷种子搜索方法: 1.在开始菜单栏或者到文件的安装路径文件夹中找到P2P种子搜索器。&nb...
- 手机怎么解压文件(苹果手机怎么解压文件)
-
手机解压文件方法:1、首先,在手机中找到文件管理,打开文件管理。2、打开文件管理之后找到压缩包,然后打开。3、打开安装包之后,选择需要的文件,。4、接下来找到“解压至”,点击“解压至”。5、点击之后,...
- 虚拟机安装centos7(虚拟机安装centos7图形界面)
-
安装CentOS7在虚拟机中,您可以按照以下步骤操作:1.下载CentOS7的ISO映像文件。2.打开虚拟机软件(如VMware、VirtualBox等)并创建一个新的虚拟机。3.在虚拟机创...
- 电脑老是重启(电脑老是重启什么原因造成的)
-
电脑由于工作环境积尘与空气湿度过大,经常使主板的接插件部分受潮产生氧化;特别是内存条插座、PCI扩展槽、键盘鼠标接口、LOT接口、CMOS电池压盒、ATX电源插座等。一旦它们出现接触不良现象,很容易出...
- win8系统怎么重装系统(win8.1系统重装教程)
-
1、修改Cortana资源占用:按Windows按钮,输入regedit,打开注册表编辑器,找到以下路径:HKEY_LOCAL_MACHINE—SYSTEM—CurrentControlSet—Ser...
- 手机163邮箱app下载(163邮箱下载手机版官网 app)
-
163邮箱登录首页入口为http://mail.163.com/网易163免费邮箱--中文邮箱第一品牌.容量自动翻倍,支持50兆附件,免费开通手机号码邮箱赠送3G超大附件服务.支持各种客户端软件收发,...
欢迎 你 发表评论:
- 一周热门
-
-
抖音上好看的小姐姐,Python给你都下载了
-
全网最简单易懂!495页Python漫画教程,高清PDF版免费下载
-
Python 3.14 的 UUIDv6/v7/v8 上新,别再用 uuid4 () 啦!
-
python入门到脱坑 输入与输出—str()函数
-
宝塔面板如何添加免费waf防火墙?(宝塔面板开启https)
-
Python三目运算基础与进阶_python三目运算符判断三个变量
-
飞牛NAS部署TVGate Docker项目,实现内网一键转发、代理、jx
-
(新版)Python 分布式爬虫与 JS 逆向进阶实战吾爱分享
-
失业程序员复习python笔记——条件与循环
-
慕ke 前端工程师2024「完整」
-
- 最近发表
- 标签列表
-
- python计时 (73)
- python安装路径 (56)
- python类型转换 (93)
- python进度条 (67)
- python吧 (67)
- python的for循环 (65)
- python格式化字符串 (61)
- python静态方法 (57)
- python列表切片 (59)
- python面向对象编程 (60)
- python 代码加密 (65)
- python串口编程 (77)
- python封装 (57)
- python写入txt (66)
- python读取文件夹下所有文件 (59)
- python操作mysql数据库 (66)
- python获取列表的长度 (64)
- python接口 (63)
- python调用函数 (57)
- python多态 (60)
- python匿名函数 (59)
- python打印九九乘法表 (65)
- python赋值 (62)
- python异常 (69)
- python元祖 (57)
