mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
default configs for ubuntu releases
This commit is contained in:
parent
4401d706a4
commit
4a3cec1290
426 changed files with 23631 additions and 0 deletions
19
install/ubuntu/17.10/templates/web/nginx/caching.sh
Executable file
19
install/ubuntu/17.10/templates/web/nginx/caching.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
user=$1
|
||||
domain=$2
|
||||
ip=$3
|
||||
home=$4
|
||||
docroot=$5
|
||||
|
||||
str="proxy_cache_path /var/cache/nginx/$domain levels=2"
|
||||
str="$str keys_zone=$domain:10m inactive=60m max_size=512m;"
|
||||
conf='/etc/nginx/conf.d/01_caching_pool.conf'
|
||||
if [ -e "$conf" ]; then
|
||||
if [ -z "$(grep "=${domain}:" $conf)" ]; then
|
||||
echo "$str" >> $conf
|
||||
fi
|
||||
else
|
||||
echo "$str" >> $conf
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue