[英]How to make HTTPS requests to AWS Load Balancer with Varnish and Nginx?
I have the following structure at AWS: 我在AWS上具有以下结构:
Route 53 DNS -> HTTPS Load Balancer(South America) -> Varnish(South America) -> Nginx(South America) -> Route 53 -> HTTPS Load Balancer(Oregon) -> Backend Ec2 instances(Oregon). Route 53 DNS-> HTTPS负载均衡器(南美)-> Varnish(南美)-> Nginx(南美)-> Route 53-> HTTPS负载均衡器(俄勒冈)->后端Ec2实例(俄勒冈州)。
I know, it can be improved, but now I need to solve this thing. 我知道,它可以改进,但是现在我需要解决这个问题。 I can't connect to the Load Balancer in Oregon.
我无法连接到俄勒冈州的负载均衡器。 I generated the certificates with AWS ACM.
我使用AWS ACM生成了证书。 That's my config in Nginx:
那是我在Nginx中的配置:
include /etc/nginx/conf.d/*.conf;
server {
listen 8080 default_server;
listen [::]:8080 default_server;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass https://mydns:443/;
proxy_set_header X-Real-IP $remote_addr;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}
Should I need to configure SSL in Nginx? 我是否需要在Nginx中配置SSL? And if so, how can I get the certificate generated at AWS?
如果是这样,我如何获得在AWS生成的证书?
Thank you now! 现在谢谢你!
Maybe, your problem is this: 也许,您的问题是这样的:
You have a Load Balancer in South America, which it has a VPC with subnets and you want to connect to another Load Balancer located in Oregon which it has another VPC with other subnets. 您在南美有一个负载均衡器,它的VPC带有子网,并且您想连接到位于俄勒冈州的另一个负载均衡器,而该负载均衡器还有另一个带有其他子网的VPC。
Your nginx is located in South America and you want to connect to Oregon. 您的nginx位于南美,您想连接到俄勒冈州。 Unless you are going to Internet (Your nginx must have access to Internet), there are two possibilites:
除非您要访问Internet(您的nginx必须访问Internet),否则有两种可能性:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.