Commit 8df70959 authored by Vitaly Lipatov's avatar Vitaly Lipatov

update_nginx.sh: disable cache support

parent b9c982b1
......@@ -43,7 +43,7 @@ cat <<EOF
}
location = /$NAME {
return 301 /$NAME/$is_args$args;
return 301 /$NAME/\$is_args\$args;
}
location /$NAME/ {
......@@ -60,12 +60,17 @@ cat <<EOF
proxy_pass $UPSTREAM;
include include/trans-proxy.conf;
EOF
if [ "$NGINX_disable_cache" != 1 ] ; then
cat <<EOF
# rewrite to cache if allowed
include include/check-skip-cache.inc;
if (\$skip_cache = 0) {
return $ECODE;
}
EOF
fi
cat <<EOF
access_log /var/log/nginx/$ACONF-access.log logdetail;
error_log /var/log/nginx/$ACONF-error.log;
......@@ -101,6 +106,6 @@ if [ "$NGINX_disable_static_stub" ] ; then
sed -i -e "s|\(.*static-stub.*\)|#\1|" $NGINXSUBDIR/$NAME.conf
fi
if ! grep -q $UPSTREAMNAME /etc/nginx/httpconf-enabled.d/upstream_$ACONF.conf ; then
if ! grep -q $UPSTREAMNAME /etc/nginx/httpconf-enabled.d/upstream_$ACONF.conf 2>/dev/null; then
print_upstream_conf >/etc/nginx/httpconf-enabled.d/upstream_$ACONF.conf
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment