I have an EC2 instance with ubuntu serverPublic IP xx.xx.xx.xx and private IP
I have a front end mobile app code deployed to iOS/android and backend code deployed to this EC2 instance ubuntu server.front end code .env file is pointing to this backend serverAPI_URL=http://xx.xx.xx.xx:3000 (public ip)now i want to change this to https://xx.xx.xx.xx:3000
i searched on internet and found zerossl.that i need to generate a cert and inject it to my server. verify the host and zerossl will make it https for me.
the step which zerossl provides is to deploy a txt file for host verification.
step1: download a txt file from zerossl - some random name like DRE5RY5EW4362432DRE5RY5EW4362432.txtstep2: deploy the file to ./well-known/api-validation/ folderstep3: make sure it is available at path http://xx.xx.xx.xx/well-known/api-validation/DRE5RY5EW4362432DRE5RY5EW4362432.txt
once we deploy zerossl will initiate verification.
Now my question is:
- how to know in which folder i need to deploy this file and using which user ID
- the server IP is private IP and the EC2 instance is public IP. so how zerossl will know or resolve the public IP(instance IP) to private IP (which is server's IP)
- how i verify that the file is available before verification from zerossl
Please help me with this. or guide me if there any other alternative to set up http to https to connect my mobile app from iOS and android to this backend server
i tried deploying the txt file to home directory by creating these two folders .well-known and api-validation and tried verification but its failing