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

Subscribe
Share

is DNS takes too long to forward request from new domain to digi ocean NS???/


Submit an 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.

Accepted Answer

trail and error i solved

This comment has been deleted

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.