I am not able to change the directory for the domain. it is working for IP but not for domain linked via DNS. when i open the domain, it is always loading default file in /var/www/html. i tried steps from below URL.
any help would be appreciated.
TIA :)
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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Heya @09c265c50be54e97be17bc554e6068,
Have you created a separate nginx config for your Domain? In that config you need to specify a
server_name
which would be your Domain:After having a separate config for your Domain with the above, then loading your Domain should point you to the right directory.
You can check more here:
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04#step-5-setting-up-server-blocks-recommended