subst PHP parameters into buffers configuration

This commit is contained in:
Asif Bacchus 2019-01-05 04:54:50 -07:00
parent 59b7d46809
commit 8a4151e718
4 changed files with 11 additions and 8 deletions

View File

@ -12,7 +12,7 @@
-1,
-1,
-1,
537
545
]
}
]

View File

@ -0,0 +1,3 @@
fastcgi_buffers 64 64k;
fastcgi_buffer_size 256k;
fastcgi_busy_buffers_size 3840k;

View File

@ -1,7 +0,0 @@
### appended by script if PHP option chosen
fastcgi_buffers 64 64k;
fastcgi_buffer_size 256k;
fastcgi_busy_buffers_size 3840k;
# for sed -- just append to end of file

View File

@ -46,6 +46,9 @@ file_ssl="nginx/snippets/ssl/ssl_certs.conf"
tag_dhparam="<path/to/your_dhparam.pem>"
tag_cachain="<path/to/your_CA_bundle.crt>"
file_mozmodern="nginx/conf.d/mozModern_ssl.conf"
file_buffers="nginx/conf.d/buffers.conf"
file_buffersPHP="nginx/conf.d/buffers_conf_php.insert"
### quick intro for the user
echo -e "\n${mag}This script will customize the provided NGINX template files for your"
@ -540,6 +543,10 @@ echo "updating ${warn}${configPath}/${file_mozmodern}${norm}"
sed -i -e "s%${tag_dhparam}%${DHPath}%" "${configPath}/${file_mozmodern}"
sed -i -e "s%${tag_cachain}%${CAChainPath}%" "${configPath}/${file_mozmodern}"
# if using PHP: process buffers.conf
if [ ${usePHP} -eq 1 ]; then
echo "updating ${warn}${configPath}/${file_buffers}${norm}"
cat "${configPath}/${file_buffersPHP}" >> "${configPath}/${file_buffers}"
# debug section