mardi 1 décembre 2020

Elastic Beanstalk - When Browsing the site from custom Domain- DNS_PROBE_FINISHED_NXDOMAIN

I have hosted my website on AWS elastic beanstalk and purchased a domain from GoDaddy. Afterward I did all required configuration as required to change nameservers and other configurations in Route 53. I also apply a SSL certificate. I works fine. But I try to browse my website 8 out of 10 times it works but the other 2 times it shows a error in browser- DNS_PROBE_FINISHED_NXDOMAIN. Until I wait for few minutes or reconnect my internet. The internet is not the problem, I have tried on different networks.

I am using a file to re-config apache to redirect my every website request to HTTPS://WWW

files:
"/etc/httpd/conf.d/ssl_rewrite.conf":
    mode: "000644"
    owner: root
    group: root
    content: |
        RewriteEngine On
        <If "-n '%{HTTP:X-Forwarded-Proto}' && %{HTTP:X-Forwarded-Proto} != 'https'">
        RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [R,L]
        </If>  

May be this is causing the problem. Website loads fine every time I load it from the URL provided by elastic beanstalk as health of instance is fine. The problem only arises when I try to use the custom domain to browse the website.




Aucun commentaire:

Enregistrer un commentaire