File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ CPU_COUNT=$( nproc)
4+ P=3000
5+ END=$(( $P + $CPU_COUNT ))
6+ CONF=" "
7+
8+ while [ $P -lt $END ]; do
9+ CONF+=" \t\tserver 127.0.0.1:$P ;\n"
10+ let P=P+1
11+ done
12+
13+ sed -i " s|# replace|$CONF |g" nginx.conf
Original file line number Diff line number Diff line change 1+ error_log stderr;
2+ worker_processes auto;
3+
4+ events {
5+ worker_connections 65535 ;
6+ multi_accept off;
7+ }
8+
9+ http {
10+ default_type application/octet-stream ;
11+ client_body_temp_path /tmp;
12+ access_log off;
13+
14+ sendfile on;
15+ tcp_nopush on;
16+ keepalive_requests 100000 ;
17+ keepalive_timeout 65 ;
18+
19+ upstream workers {
20+ # replace
21+ }
22+
23+ server {
24+ listen 8080 ;
25+ server_name tfb-server ;
26+
27+ location / {
28+ proxy_http_version 1.1;
29+ proxy_set_header Connection "" ;
30+ proxy_pass http ://workers;
31+ }
32+ }
33+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ CPU_COUNT=$( nproc)
4+ P=3000
5+ END=$(( $P + $CPU_COUNT ))
6+
7+ while [ $P -lt $END ]; do
8+ zap $P &
9+ let P=P+1
10+ done
You can’t perform that action at this time.
0 commit comments