global-config
Usage: oredge global-config ACTION [OPTIONS]
ACTION:
show
modify
help
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Show global-config
Usage: oredge global-config show PARTITION_ID [OPTIONS]
OPTIONS:
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
$ oredge global-config show 1
WORKER CONNECTIONS : 10600
WORKER PROCESSES NUMBER: 1
WORKER RLIMIT NOFILE : 20480
LISTEN BACKLOG : 512
REUSEPORT : true
SSL SESSION TICKET : true
WORKER SHUTDOWN TIMEOUT: 102
SSL SESSION TIMEOUT : 5
SSL SESSION CACHE : 32
SSL PROTOCOLS : TLSv1.2,TLSv1.3
SSL CIPHERS : TLS_AES_256_GCM_SHA384:EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
PROXY TEMPORARY PATH : /usr/local/oredge-node/client_body_temp/
PROXY INTERCEPT ERRORS : true
PROXY BUFFER SIZE : 8k
PROXY BUFFERS COUNT : 8
PROXY BUFFERS SIZE : 16k
PROXY BUSY BUFFERS SIZE: 100
SET REAL IP FROM : 1.1.1.1,2.2.2.2,3.3.3.3
REAL IP HEADER : X-Real-IP
Modify global-config
Usage: oredge global-config modify PARTITION_ID [OPTIONS]
OPTIONS:
Usage: oredge global-config modify PARTITION_ID [OPTIONS]
OPTIONS:
--worker-connections integer Worker connections.
--worker-processes integer Worker processes number.
--worker-rlimit-nofile integer Maximum number of open files.
--listen-backlog integer Listening socket's backlog queue size.
--set-real-ip-from string Use real IP replace the source IP only if the source server is in the trusted address list, multiple ip address split by comma.
--set-real-ip-from-file string Same function as above, but the parameter is a file, and the file has one ip per line.
--real-ip-header string Change the client address and optional port to those sent in the specified header field.
--worker-shutdown-timeout integer Configures a timeout for a graceful shutdown of worker processes, should less than 120 seconds.
--ssl-session-ttl integer SSL session timeout.
--ssl-session-cache string Cached the SSL session to share memory. 32MB holds approximately 65,154 session keys per OpenResty Edge gateway server.
--ssl-protocols string SSL protocols, can add multiple times.
--ssl-ciphers string SSL ciphers.
--client_body-temp-path string Proxy temporary path.
--proxy-intercept-errors bool Intercept the origin site's error pages, ture or false.
--proxy-buffer-size string Proxy buffer size. For example 8k, 8m.
--proxy-buffers-count integer The number of the buffers.
--proxy-buffers-size string The size of each buffer. For example 8k, 8m.
--proxy-busy-buffers-size string Limits the total size of buffers that can be busy sending a response to the client while the response is not yet fully read.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
PARTITION_ID
Specify the partition you want to configure.
--worker-connections number
Specify the number of worker connections.
--worker-processes number
Specify the number of worker processes.
--worker-rlimit-nofile number
Specify the maximum number of open files.
--listen-backlog number
Specify the backlog queue size of listening socket.
--set-real-ip-from "ip list"
Use real IP replace the source IP only if the source server is in the trusted address list, multiple ip address split by comma.
--set-real-ip-from-file "file"
Same function as above, but the parameter is a file, and the file has one ip per line.
--real-ip-header "header"
Change the client address and optional port to those sent in the specified header field.
--worker-shutdown-timeout timeout
Configures a timeout for a graceful shutdown of worker processes, should less than 120 seconds.
--ssl-session-ttl ttl
Specify the ttl of SSL session.
--ssl-session-cache size
Cached the SSL session to share memory. For example 32k, 32m.
--ssl-protocols "protocol"
SSL protocols. For example TLSv1.2.
--ssl-ciphers "cipher"
Specify SSL ciphers.
--client_body-temp-path "path"
Proxy temporary path.
--proxy-intercept-errors "true or false"
Intercept the origin site’s error pages, ture or false.
--proxy-buffer-size size
Proxy buffer size. For example 8k, 8m.
--proxy-buffers-count count
The number of the buffers.
**--proxy-buffers-size size
The size of each buffer. For example 8k, 8m.
--proxy-busy-buffers-size size
Limits the total size of buffers that can be busy sending a response to the client while the response is not yet fully read.
Example
- Set real ip from.
cat << EOF > ip_list.txt
1.2.3.4/24
5.6.7.8/16
9.1.2.3
EOF
$ oredge global-config modify 1 --set-real-ip-from "1.1.1.1,2.2.2.2/24" --set-real-ip-from-file ip_list.txt
OK
- Set real ip header to X-Real-IP.
$ oredge global-config modify 1 --real-ip-header X-Real-IP
OK
- Set worker connections.
$ oredge global-config modify 1 --worker-connections 1024
OK
- Set proxy buffer size.
$ oredge global-config modify 1 --proxy-buffer-size 64k
OK