Problem with new subdomains

Posted January 11, 2019 1.2k views


I have a stranger problem in my cloud.

When I add new subdomain (vhost), the new subdomain go to a folder is different that I determine it.
Any new subdomain go to the same folder.

All new subdomains go to the same folder.

There is no error or wrong syntax in 000-default.conf,
And I checked the redirections, there is no redirection !!

I cannot find the problem,
I hope to find help.


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.

Submit an Answer
2 answers

Did you restart apache after adding the subdomains? That’s needed.



You need to create a new config file for each new subdomain you create.

Please refer to this tutorial for help.


by Brennen Bearnes
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 16.04 server.