Problem with new subdomains

January 11, 2019 357 views
Apache

Hi,

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.

Thanks

2 Answers

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

Cheers

@magha

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

Please refer to this tutorial for help.

Mouhsen

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.
Have another answer? Share your knowledge.