整理性能测试用nginx测试容器,改用docker-compose编排,避免手动操作
This commit is contained in:
48
conf/nginx.conf
Normal file
48
conf/nginx.conf
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
user nginx;
|
||||||
|
worker_processes 32;
|
||||||
|
worker_rlimit_nofile 131072;
|
||||||
|
|
||||||
|
error_log /var/log/nginx/error.log warn;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 32768;
|
||||||
|
use epoll;
|
||||||
|
multi_accept off;
|
||||||
|
accept_mutex off;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
access_log off;
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 30;
|
||||||
|
gzip off;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl reuseport;
|
||||||
|
server_name www.server.com www.server1.com;
|
||||||
|
|
||||||
|
ssl_certificate /etc/nginx/ssl/server.crt;
|
||||||
|
ssl_certificate_key /etc/nginx/ssl/server.key;
|
||||||
|
ssl_session_tickets on;
|
||||||
|
ssl_session_cache off;
|
||||||
|
ssl_session_cache shared:SSL:30m;
|
||||||
|
ssl_session_timeout 30m;
|
||||||
|
ssl_protocols SSLv2 SSLv3 TLSv1.2;
|
||||||
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
nginx:
|
||||||
|
image: nginx:latest
|
||||||
|
container_name: performance-test-nginx-server
|
||||||
|
volumes:
|
||||||
|
- ./conf/nginx.conf:/etc/nginx/nginx.conf
|
||||||
|
- ./ssl/:/etc/nginx/ssl/
|
||||||
|
- ./static/:/usr/share/nginx/html/
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 443:443
|
||||||
16
ssl/server.crt
Normal file
16
ssl/server.crt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIICdDCCAd0CFE27cWzYn7iZ1TW4WXWRnIwttX4BMA0GCSqGSIb3DQEBCwUAMHkx
|
||||||
|
CzAJBgNVBAYTAkNOMQswCQYDVQQIDAJTQzELMAkGA1UEBwwCQ0QxCjAIBgNVBAoM
|
||||||
|
AVMxCjAIBgNVBAsMAVMxFzAVBgNVBAMMDnd3dy5zZXJ2ZXIuY29tMR8wHQYJKoZI
|
||||||
|
hvcNAQkBFhBhZG1pbkBzZXJ2ZXIuY29tMB4XDTE4MDgxODE5MDUyMVoXDTE5MDgx
|
||||||
|
ODE5MDUyMVoweTELMAkGA1UEBhMCQ04xCzAJBgNVBAgMAlNDMQswCQYDVQQHDAJD
|
||||||
|
RDEKMAgGA1UECgwBUzEKMAgGA1UECwwBUzEXMBUGA1UEAwwOd3d3LnNlcnZlci5j
|
||||||
|
b20xHzAdBgkqhkiG9w0BCQEWEGFkbWluQHNlcnZlci5jb20wgZ8wDQYJKoZIhvcN
|
||||||
|
AQEBBQADgY0AMIGJAoGBAOTYEI2NvZb5+5Hk2XTERFz2zzwPuOd2k10GICW7q6/k
|
||||||
|
BWwF9iibRhtdqgcCL1WhacdMwBD3dcqPCkKBkFigFZ9HWEtdacoZvySg7I8pl9HA
|
||||||
|
Ln42PWHeudFsf0zqNG1+t5ZjaMBoBEs/4zm1KNbwAFmE1IPpW+Yh6SkoLHIai3jh
|
||||||
|
AgMBAAEwDQYJKoZIhvcNAQELBQADgYEAIaO4G2nak8TPl8pPBeVSZnH0e8sX1s1P
|
||||||
|
Q1VjHnhSCSYnaB0/9j/ofV1a4avul0Mfqcq8hykyvV0dbU5KuYgGXDMnvKEcqd7j
|
||||||
|
6kEwIs5CJaga4ipirh77ZjQlOkEsJDw3P6mI2mHX/ZcFOxlbHGAjWG76E0unnd7x
|
||||||
|
AQzawqsKctM=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
15
ssl/server.key
Normal file
15
ssl/server.key
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIICXgIBAAKBgQDk2BCNjb2W+fuR5Nl0xERc9s88D7jndpNdBiAlu6uv5AVsBfYo
|
||||||
|
m0YbXaoHAi9VoWnHTMAQ93XKjwpCgZBYoBWfR1hLXWnKGb8koOyPKZfRwC5+Nj1h
|
||||||
|
3rnRbH9M6jRtfreWY2jAaARLP+M5tSjW8ABZhNSD6VvmIekpKCxyGot44QIDAQAB
|
||||||
|
AoGAHa1TgDf4dULX+BSYiscFIpUzTNOxI/tBoxevRZVv73B/r4GaaauxTM05xozm
|
||||||
|
/JDhOeJfKhQdZ3ZjWzqYMJYaF34IS0/Iqzu7rLjazy8jOWLfsZSSAzWECDnPHe9z
|
||||||
|
IIMXm813k5aXwgK3XMSiuIoODpFd76nEI+cRSHK5TC3lUxECQQD5GMNbRyl/O2Cv
|
||||||
|
Ul52xNM4OK8NPuL0aLMx4rA+QgFrWk3qQnyQEAt23Dv943G98ni9JNCUKgbNMQCn
|
||||||
|
xJTbbjQtAkEA6y+d7yjU8S0X0LldT0LoqQAv9jEi2VnzjVBxdffI7sN1FJfw0xBk
|
||||||
|
8Maq8WPnHW7wnGrIRqb2o3NYi3APZHrEBQJBANOZ7ZoEgYPLdP56AjTyTltcC5g8
|
||||||
|
656jslWWNBEvEPWY6McvY5EdkB+QRoYOR/kLmPVT6Lt0WALGtb/OhoVAwKECQQCU
|
||||||
|
ASxX5I9Vk3YoUW7qQYYfTNHiEfwHYndGGDi+74eQ0opswk241dlgOPY84Q0B1d4v
|
||||||
|
4XdWFx6hsCYp4gSdzDBtAkEAtk0OJ4HTgppMZ7l1rPndIRlkG53eIZt+qOhv4k1S
|
||||||
|
d8eHeg24sWVKdObizmr3P++dfxuwZEPO2qlCrgVPPUynjw==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
BIN
static/128B.html
Normal file
BIN
static/128B.html
Normal file
Binary file not shown.
BIN
static/16K.html
Normal file
BIN
static/16K.html
Normal file
Binary file not shown.
BIN
static/1K.html
Normal file
BIN
static/1K.html
Normal file
Binary file not shown.
BIN
static/1M.html
Normal file
BIN
static/1M.html
Normal file
Binary file not shown.
BIN
static/256B.html
Normal file
BIN
static/256B.html
Normal file
Binary file not shown.
BIN
static/2K.html
Normal file
BIN
static/2K.html
Normal file
Binary file not shown.
BIN
static/2M.html
Normal file
BIN
static/2M.html
Normal file
Binary file not shown.
BIN
static/32K.html
Normal file
BIN
static/32K.html
Normal file
Binary file not shown.
BIN
static/4K.html
Normal file
BIN
static/4K.html
Normal file
Binary file not shown.
BIN
static/4M.html
Normal file
BIN
static/4M.html
Normal file
Binary file not shown.
4
static/512B.html
Normal file
4
static/512B.html
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<EFBFBD><EFBFBD><EFBFBD>f<EFBFBD><EFBFBD>&`a s<><73>R^<11><><EFBFBD>c<EFBFBD>{Z<><5A><EFBFBD><EFBFBD><EFBFBD>"<22>ѮT<D1AE>k<EFBFBD>Zx<5A><78>n<EFBFBD><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>D<EFBFBD>KW~<7E><>5c<06>,<2C><>]űՅǿ<D585>TeW<1A>r<><72><0F><>j<EFBFBD>]<5D>V<EFBFBD><56>q]4
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD>BmKWƵP<EFBFBD>睂<EFBFBD><EFBFBD><06>P<EFBFBD>bv<62><76><EFBFBD>9zQ<7A>5Ze<>PW<50><1D><>(uě"
|
||||||
|
+ l<><6C><19><10>p<>6<<EFBFBD><EFBFBD>2<><32>U<EFBFBD>Fu1S<31><53><EFBFBD><EFBFBD>* <09>O<EFBFBD><17>6
|
||||||
|
<EFBFBD>>)(<28>YׁZr<5A><72>G9<7F>`I
|
||||||
BIN
static/64K.html
Normal file
BIN
static/64K.html
Normal file
Binary file not shown.
BIN
static/8K.html
Normal file
BIN
static/8K.html
Normal file
Binary file not shown.
Reference in New Issue
Block a user