Question

why my domain is not working in nginx, django?

hi

  1. i purchesd new domain like vtuallinoneresources.com in nextraone hosting services .

  2. then i replaced the servername space to ns1,2,3 digital ocean

  3. i checked the “https://www.inmotionhosting.com/support/tools/visual-domain-routing?domain=vtuallinoneresources.com” where my new domain server point to old or new NS

  4. its pointing to new digital ocean NS

5.in my :$ nano /etc/nginx/sites-available/hello i changed ip address to domain name

    listen 80;

    # add here the ip address of your server
    # or a domain pointing to that ip (like example.com or www.example.com)
   #server_name my ip address;
    server_name vtuallinoneresources.com;

    keepalive_timeout 5;
    client_max_body_size 4G;

  1. in django settings.py file added domain name in allowed host like this ALLOWED_HOSTS = [‘127.0.0.1’,‘localhost’,‘68.183.90.158’,‘vtuallinoneresources.com’]

  2. but is not working now with domain name instead of ip address

Show comments

Submit an answer


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!

Sign In or Sign Up to Answer

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.

Accepted Answer

trail and error i solved

This comment has been deleted

    Prakash Jha
    DigitalOcean Employee
    DigitalOcean Employee badge
    March 7, 2019

    Hey there! I am not exactly sure how you have configured nginx blocks but the first thing I have noticed is your Domain is not resolving to any IP. This is because you have added the domain on DigitalOcean account but haven’t added any A record and CNAME for the domain.

    Please add an A record for vtuallinoneresources.com to 68.183.90.158 and a CNAME record for www.vtuallinoneresources.com Is AN alias of vtuallinoneresources.com

    Keep me posted on how it goes after the DNS correction.

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    Become a contributor for community

    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

    DigitalOcean Documentation

    Full documentation for every DigitalOcean product.

    Resources for startups and SMBs

    The Wave has everything you need to know about building a business, from raising funding to marketing your product.

    Get our newsletter

    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

    The developer cloud

    Scale up as you grow — whether you're running one virtual machine or ten thousand.

    Get started for free

    Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

    *This promotional offer applies to new accounts only.