By uehtesham90
I mapped my DO server ip address to a DNS with a domain i registered on namecheap. This is what i go on DO as my Zone File:
$TTL 1800
@ IN SOA NS1.DIGITALOCEAN.COM. hostmaster.noobhacker.org. (
1413865446 ; last update: 2014-10-21 04:24:06 UTC
3600 ; refresh
900 ; retry
1209600 ; expire
1800 ; ttl
)
IN NS NS1.DIGITALOCEAN.COM.
NS NS2.DIGITALOCEAN.COM.
NS NS3.DIGITALOCEAN.COM.
@ IN A 107.170.56.32
Then on the DO server, i ran the following commands:
python main.py
I got the following:
Then on the browser, I ran noobhacker.org:5000 but I get Webpage not available. It should have shown the simple “Hello World!!!” output.
My source code is here: https://github.com/ueg1990/mooc_aggregator_restful_api
I would really appreciate some help here. :)
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!
Hey, thanks alot for the reply. I will definitely check it out today. I really hope this works :)
The IP 127.0.0.1 is the localhost. On your server, if you run:
curl http://127.0.0.1:5000/
You should see the raw html outputted to the terminal. In order to make your app visible externally, you need to make it bind to the public interface not just the local one. This can be done by modifying the run method in your main.py
app.run(host='0.0.0.0')
Check out the section title “Externally Visible Server” in the Flask quickstart docs.
Generally that is useful for developing and testing remotely, but when it comes time to deploy your site for production you’ll want to setup a webserver like Apache or Nginx in front of the app. For more details on how to accomplish that, check out:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.