【发布时间】:2018-10-17 19:32:14
【问题描述】:
设置
R53--->ELB(Classic+SSL)--->Nginx(只有一个实例)
我的 Nginx 服务器上正在运行一个应用程序,它正在侦听端口 80。Nginx 实例工作正常,我可以通过其公共 IP 访问它。
我现在在我的 Nginx 前面放置了一个 ELB,ELB 将我的实例注册为健康的,我可以点击 ELB(经典)公共 URL 来访问我的网站。我正在终止 ELB 本身的 SSL
现在,当我在 Route53 上放置一个 CNAME 条目并将其指向我的 ELB 时,我到达了
503 Service Unavailable : 没有服务器可以处理这个请求。
我尝试了很多方法,但不知道为什么会这样。
我的 Nginx 文件看起来像:
server {
listen 80 ;
listen [::]:80;
root /home/ubuntu/partner/public;
index index.html index.htm index.nginx-debian.html;
# Make site accessible from http://asw.xyz.community/
#server_name drone.xyz.community;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log debug;
#return 301 $schema://www.drone.xyz.community$request_uri;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
}
【问题讨论】:
标签: amazon-web-services nginx amazon-elb amazon-route53