How to Assign a Custom Domain to your AMI

    Once you have checked that the application is running properly and all of the data was successfully migrated, you can Assign a Custom Domain to your AMI. To do so, the first step is to associate an static IP address to your instance.

    Configure your DNS provider

    Then you need to configure your DNS provider. To do so, you should go to your DNS provider management console and point the domain name to the AMI IP. Below are step by step instructions for some of the popular DNS providers:

    Please note that it may take some time before all of the DNS servers refresh the new domain location. 

    Configure the Domain in your DNS Provider with CNAME

    Alternatively, you can use a CNAME instead of A-record. CNAME allows you to point one domain to another. In this case, it is not required to assign an static IP to your server. You will just need to configure your CNAME to point to the http://ec2-XXX-XXX-XXX-XXX.compute-amazonaws.com domain you have chosen for your server. 

    Please note that it may take some time before all of the DNS servers refresh the new domain location.

    After that, you need to configure your application to use the new domain. To do it, you just need to execute your bnconfig script.

    sudo /opt/bitnami/apps/YOUR_APPLICATION_NAME/bnconfig --machine_hostname YOUR_NEW_DOMAIN
    

    Finally, you need to disable the update_ip script included in the Bitnami AMIs. To do so, you just need to execute the following command

    sudo mv /opt/bitnami/scripts/init/update_ip /opt/bitnami/scripts/init/update_ip.bk 

    Once the DNS servers have been updated (note that this sometimes takes a few minutes), you can access the new instance using the same domain name that you configured.

    Tag page (Edit tags)
    • No tags
    Page statistics
    1611 view(s), 1 edit(s) and 3348 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments