I have a website say www.example.com I redirected and changed my nameservers to point to digitalocean servers I have. Unfortunately the website is redirecting by default to /var/www and showing index.html content. Instead I want to redirect the example.com to /var/www/example folder
What should I do?
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.
You need to setup your virtual hosts properly here is a DO tutorial on how to do it.
If you get stuck or get an error let us know and we will try to help you.
Hope this helps.
Good Luck!
Hello aguilar, We have setup virtual hosts properly. But the problem we are facing is something like this.
Eg: I have two websites www.example1.com and www.example2.com
When I set up my website, example1 it works fine and its content shows up. But when I setup example2 with its content. Even example1 starts showing the content of example2.
When I check their paths in the etc/sitesavailable, It has correctly different paths.
For example1 its /var/www/example1/public_html For example2 its /var/www/example2/public_html
Even though the paths are setup differently the contents of example1 gets overwrite with the contents of example2
Kindly help us out. Don’t you guys have a live support?
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.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
