My droplet was up and running and then I added the domain name to my droplet then at first It was showing an error (BAD REQUEST(400)) then I have gone through this link to resolve that error because I was able to access the droplet using IP address but I was unable to load it using domain name:
When I connected to godaddy they have told me that you need to wait for 49 hours and after that, you will be able to access your app using domain name but their answer was unsatisfactory so I tried below steps:
After doing this my error is not resolved then I tried these steps below: I did three things:
First, I updated my ALLOWED_HOSTS:
ALLOWED_HOSTS = [‘12.345.67.890’, ‘sub.domain.com’, ‘www.sub.domain.com’] Then, I also edited the server_name setting in my nginx configuration: server_name 12.345.67.890 sub.domain.com www.sub.domain.com; Lastly, I restarted nginx and rebooted the machine to make sure it all worked: sudo service nginx restart sudo reboot
But (sudo service nginx restart) this step failed and now I am unable to access my droplet even from the IP address it is showing that my (IP address has refused to connect by using IP address and using domain name too). I have started various steps like rebooting the droplet, load from the recovery, power cycle etc but now of that worked and I am still unable to access the droplet.
Kindly help me with this as I have started using this platform since yesterday.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello, @mishragovind973
Would you mind first checking your nginx configuration file for any syntax errors? You can do this using the following command:
In this way you can check if there is an error (syntax related) in the nginx file in order to fix it and make nginx back online. You can share what’s the output of the command here.
Regarding the domain name, can you please check if the domain name is resolving using this website - https://www.whatsmydns.net check for the A record, basically just enter your domain name and click the Search button.
Looking forward to your reply. Alex