File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ Variable | Example | Description
8
8
` SERVER_INDEX ` | ` SERVER_INDEX index.html index.html index.php ` | Changes the default pages to hit for folder and web roots
9
9
` SERVER_APP_NAME ` | ` SERVER_APP_NAME='view' ` | Sets a kv pair to be consumed by logging service for easy parsing and searching
10
10
` SERVER_GZIP_OPTIONS ` | ` SERVER_GZIP_OPTIONS=1 ` | Allows default set of static content to be served gzipped
11
+ ` SERVER_SENDFILE ` | ` SERVER_SENDFILE=off ` | Allows runtime to specify value of nginx's ` sendfile ` (default, on)
11
12
12
13
13
14
### Runtime Commands
Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ echo '[nginx] piping logs to STDOUT'
19
19
sed -i " s/access_log \/var\/log\/nginx\/access\.log;/ log_format main \'\$ remote_addr - \$ remote_user [\$ time_local] \"\$ request\" \$ status \$ bytes_sent \"\$ http_referer\" \"\$ http_user_agent\" ${SERVER_APP_NAME} \';\n access_log \/dev\/stdout main;\n/" $CONFIG_SERVER
20
20
sed -i " s/error_log [a-z\/\.\ \;]\+/error_log \/dev\/stdout info;/" $CONFIG_SERVER
21
21
22
+ if [[ $SERVER_SENDFILE ]]
23
+ then
24
+ echo " [nginx] server sendfile status is ${SERVER_SENDFILE} "
25
+ sed -i " s/sendfile on/sendfile ${SERVER_SENDFILE} /" $CONFIG_SERVER
26
+ fi
27
+
22
28
if [[ $SERVER_MAX_BODY_SIZE ]]
23
29
then
24
30
echo " [nginx] server client max body is ${SERVER_MAX_BODY_SIZE} "
You can’t perform that action at this time.
0 commit comments