AWS EC2 S3冲突

时间:2018-12-16 00:54:44

标签: amazon-web-services amazon-s3 amazon-ec2 amazon-cloudfront

嗨,我在创建托管AngularJs应用程序的EC2实例时遇到了很大的麻烦,简而言之,我有一个带有弹性ip和域名http://dev.mydomain.net的EC2实例(计算机已安装Nginx),我的工作区是由詹金斯(Jenkins)复制到名为S3.dev.mydomain.net的S3存储桶,该存储桶由CDN发行版支持,我的目标是创建一个新域名(dev2.mydomain.net),因此我首先从一个实例创建了一个映像,然后创建了另一个S3存储桶,即CDN问题是,每当我尝试使用http://dev2.mydomain.net从外部访问Angular App时,我都会重定向到Nginx欢迎页面!每当我尝试使用新创建的实例公共dns访问App时,都会被证书NET::ERR_CERT_COMMON_NAME_INVALID

捕获

鉴于新创建的实例具有与原始实例相同的安全性配置文件,我还浏览了所有AWS服务,以了解实际上http:dev.mydomain.net是如何链接到原始实例的弹性ip的,但是我没有,关于我错过了什么

更新:原始实例上的Nginx conf:

user                    nginx;
error_log               /var/log/nginx/error.log warn;
pid                     /var/run/nginx.pid;
worker_processes        auto;
worker_rlimit_nofile    133916;

events {
worker_connections  1024;
}

http {
include       /etc/nginx/mime.types;
default_type  application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

include       conf.d/*.conf;

map $http_upgrade $connection_upgrade {
    default     "upgrade";
}

server {
    listen        80 default_server;
    access_log    /var/log/nginx/access.log main;

    client_header_timeout 60;
    client_body_timeout   60;
    keepalive_timeout     60;
    gzip                  off;
    gzip_comp_level       4;
    gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    # Include the Elastic Beanstalk generated locations
    include conf.d/elasticbeanstalk/*.conf;
 }
}

0 个答案:

没有答案