Nginx核心知识100讲 第一部分课件
Nginx核心知识100讲 第一部分课件
/
Nginx
Nginx
• I A
nginx
API
• Nginx 2
•
•
• OpenResty
/
Nginx
A
Nginx 1
BSD
Nginx k mainline
S keepalive http eT
Nginx PlusL S . 5441
7 2 O
S S 7 54
74 0 l S. 5 Fd
aFd
S i
S
3 4 7bc
S
. 5
h
Nginx
Nginx Nginx.conf
• • nginx
access.log error.log
• http •
Nginx Nginx Plus
nginx.org
nginx.com
Tengine
OpenResty OpenResty
OpenResty http://openresty.org
OpenResty https://openresty.com
Nginx
Nginx Configure
01 02 03 04 05 06
Nginx
01
02
03
04 include
05 #
06 $
07
Nginx
milliseconds days
seconds weeks
kilobytes
megabytes
gigabytes
Nginx
http
server
http
location
upstream
Nginx
Nginx
1 nginx -s reload
0 -? -h
4 5 -c
4 4 -g
stop
quit
4 2 -p
reload
-s
reopen
5 6 7 -t -T
3 nginx 8 -v -V
http server
location alias
Access format
Go access
• Realtime websocket
Access log
TLS/SSL
1995 SSL3.0 SSL/TLS
2006 TLS1.1
2008 TLS1.2
2018 TLS1.3
) )
) ( ) ) )
TLS
Bob Alice
Alice Alice
Bob Alice
PKI
domain validated DV
organization validated OV
extended validation EV
TLS 4 2
Factor affecting
performance
Client Hello
-Supported ciphers
-Random number
-Session ID(if any)
6
Server
-choosen ciphers Hello
-random number
-Session ID
ASYMMETRIC ALGORITHM
Check
Server
SERVERUR HARDWARE
Hello
1 ClientKey
Exchange
-Encrypted
Done
Message
premaster secret
Key Key
generation generation
CipherSpec
Exchange
3 5 Finished
CipherSpec
Exchange
Finished
ASYMMETRIC
ALGORITHM
AES128
Let’s Encrypt
Nginx
•
Nginx
OpenResty 0 2
3 OpenResty
01
05 02 1
04 03 Lua
4
/