https configuration
Describes configuration steps required for assigning Domain name and performing https configuration on RAIR instance installed on Virtual Machine
Adding A record
Purchase a domain name from Domain Provider.After verifying Static Public IP assigned to VM from Cloud provider on which RAIR is installed, go to your domain provider and navigate to DNS Settings.Add A record pointing to your Public IP Address. For example:
An A record with mydomainname.com pointing to your server’s public IP address.
An A record with www.mydomainname.com pointing to your server’s public IP address.
Generate dummy certificates
copy init-letsencrypt.sh script from rair-infra directory to your rair base directory (rair-dapp) and edit the script to add in your domain(s).
Then run chmod +x init-letsencrypt.sh
and sudo ./init-letsencrypt.sh
.
Start RAIR app with dummy certificates
Edit the rair-front/nginx/nginx.conf.ssl script to add in your domain(s).
Copy rair-front/nginx/nginx.conf.ssl to rair-front/nginx/nginx.conf
Run the script
sudo docker-compose -f docker-compose.local-ssl-without_certbot.yml up -d
At this point, you can navigate to the Domain in Browser and check if the Application is working but with dummy certificate
Run the script
sudo docker-compose -f docker-compose.local-ssl-without_certbot.yml down
Generate real certificates using letsencrypt
Edit script docker-compose.local-ssl-with_certbot.yml to add in your domain(s) and email address.
Delete dummy certificates
rm -rf data/certbot/conf/live/<domain>
Run the script
sudo docker-compose -f docker-compose.local-ssl-with_certbot.yml up -d certbot
Verify that real certificates are generated by checking logs of certbot container (Please note that certbot container will stop automatically after generating certificates)
Modify rair-front/nginx/nginx.conf with actual path of ssl certificates (modify ssl_certificate and ssl_certificate_key variables in nginx.conf )
Stop the app by running script
sudo docker-compose -f docker-compose.local-ssl-with_certbot.yml down
Start RAIR app
Run the script
sudo docker-compose -f docker-compose.local-ssl-without_certbot.yml up -d
NOTE : Please ensure Ports for http & https (80 & 443) are open on Virtual Machine
Last updated