Switch proxy resolver to use the local resolv.conf values
This commit is contained in:
parent
dd2e086a20
commit
460137779f
2 changed files with 5 additions and 2 deletions
|
@ -2,6 +2,9 @@
|
|||
|
||||
echo 'Starting nginx'
|
||||
|
||||
NAMESERVER=`cat /etc/resolv.conf | grep "nameserver" | awk '{print $2}' | tr '\n' ' '`
|
||||
echo "resolver $NAMESERVER valid=10s;" > /conf/nginx/resolver.conf
|
||||
|
||||
if [ -f /conf/stack/ssl.key ]
|
||||
then
|
||||
echo "Using HTTPS"
|
||||
|
|
|
@ -31,9 +31,9 @@ location /realtime {
|
|||
}
|
||||
|
||||
location ~ ^/_storage_proxy/([^/]+)/([^/]+)/([^/]+)/(.+) {
|
||||
auth_request /_storage_proxy_auth;
|
||||
include resolver.conf;
|
||||
|
||||
resolver 8.8.8.8;
|
||||
auth_request /_storage_proxy_auth;
|
||||
|
||||
proxy_pass $2://$3/$4$is_args$args;
|
||||
|
||||
|
|
Reference in a new issue