Virtual Host Problem (404 Not Found).

November 17, 2013 8.7k views
Hi, Hope you are well. I created droplet and set up two virtual hosts (pointed two domains to DigitalOcean NS). One is working just fine and I can access virtual host files from domain name, but second is giving me "404 Not Found nginx/1.4.1 (Ubuntu)". Both set up properly and same way. Could it be the problem that one of the domains have same name as droplet and PTR record? Thank you! Best regards, Ignaty.
4 Answers
"Both set up ... same way."

That's the problem. They can not be the same. Almost the same? Yes; but not exactly the same.

Have you check out How To Set Up Apache Virtual Hosts on Ubuntu 12.04 LTS.
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache.
Check nginx's error logs. The root path is probably incorrect.
Oops, if using Nginx, then you want to check out How To Serve Multiple Ghost Blogs on One VPS Using Nginx Server Blocks.
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one website or domain off of a single server and IP address. When used with nginx, virtual hosts are called Server Blocks. This tutorial covers setting up server blocks on an Ubuntu server.
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one website or domain off of a single server and IP address. When used with nginx, virtual hosts are called Server Blocks. This tutorial covers setting up server blocks on an Ubuntu server.
Have another answer? Share your knowledge.