Answer the question
In order to leave comments, you need to log in
Why doesn't Nginx substitute variable in proxy_pass?
Good afternoon!
Why doesn't Nginx substitute variable in proxy_pass?
Now this part of the config looks like this:
server {
# ...
set $s3_server "s3.eu-central-1.amazonaws.com";
set $s3_bucket "wtf";
location / {
expires 30d;
proxy_set_header Host $s3_server;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass $scheme://$s3_server/$s3_bucket/;
}
# ...
}
Answer the question
In order to leave comments, you need to log in
See error_log for what exactly he didn't find there.
And it is worth updating to 1.9.13.
nginx.org/en/CHANGES
*) Bugfix: in the "proxy_pass", "fastcgi_pass", "scgi_pass", and
"uwsgi_pass" directives when using variables.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question