Cloudfront custom-origin distribution returns 502 “ERROR The request could not be satisfied.” for some URLs

后端 未结 14 2561
旧巷少年郎
旧巷少年郎 2020-12-07 15:32

We have a Cloudfront distribution with custom origin that has been working just fine for quite a long time, serving static assets for one of our sites. Just this morning, we

相关标签:
14条回答
  • 2020-12-07 16:19

    I had a similar issue recently which turned out to be due to ssl_ciphers that I was using.

    From http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html,

    "CloudFront forwards HTTPS requests to the origin server using the SSLv3 or TLSv1 protocols and the AES128-SHA1 or RC4-MD5 ciphers. If your origin server does not support either the AES128-SHA1 or RC4-MD5 ciphers, CloudFront cannot establish an SSL connection to your origin. "

    I had to change my nginx confg to add AES128-SHA ( deprecated RC4:HIGH ) to ssl_ciphers to fix the 302 error. I hope this helps. I have pasted the line from my ssl.conf

    ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:RSA+3DES:AES128-SHA:!ADH:!AECDH:!MD5;
    
    0 讨论(0)
  • 2020-12-07 16:19

    Fixed this issue by concatenating my certificates to generate a valid certificate chain (using GoDaddy Standard SSL + Nginx).

    http://nginx.org/en/docs/http/configuring_https_servers.html#chains

    To generate the chain:

    cat 123456789.crt gd_bundle-g2-g1.crt > my.domain.com.chained.crt
    

    Then:

    ssl_certificate /etc/nginx/ssl/my.domain.com.chained.crt;
    ssl_certificate_key /etc/nginx/ssl/my.domain.com.key;
    

    Hope it helps!

    0 讨论(0)
提交回复
热议问题