Answer the question
In order to leave comments, you need to log in
How to proxy HTTPS in Nginx?
Good afternoon,
There is a project progect.com, it works on https. Pictures for the project are physically located on 3 different servers
1. Physically next to progect.com
2. On the server 1.1.1.1
3. On the server 2.2.2.2
The last 2 give them on request https://content.progect.com/img
I collect all with this nginx config
http {
[…]
upstream content {
server 1.1.1.1:443;
server 2.2.2.2:443;
}
server {
listen 443 ssl;
server progect.com;
[…]
location /img {
try_files $uri @image;
}
location @image {
proxy_pass https://content;
proxy_next_upstream http_404;
proxy_set_header Host content.progect.com;
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question