Troubles with apache and virtual hosts

Posted by xZero on Server Fault See other posts from Server Fault or by xZero
Published on 2012-11-09T16:20:38Z Indexed on 2012/11/09 17:04 UTC
Read the original article Hit count: 224

Filed under:
|
|
|

I have a BIG problem. I have VPS with Debian OS, and LAMP installed. Fresh install. For control panel i using Webmin. Now i trying to setup multiple sub-domains on my server using webmin for example:

downloads.my-domain.com
cpanel.my-domains.com
forum.my-domains.com

But problem what is happening is next, while i using no virtual hosts, everything works perfectly when i accessing it using my-domain.com, but when i add Virtual host, i cann access it but my-domain.com becomes unavilable because it redirects to virtual hosts i added. When i add more than 2 virtual hosts, problem is still here. Also, when i try to access to virtual server for example downloads.my-domain.com, it redirects again to cpanel.my-domains.com When i delete virtual hosts, access to my-domain.com is succesfull...

What i known:

- That is not problem with my domain provider. I correctly added subdomains and added host record to my VPS IP.
- I added unique name to every single virtual host. 
- There are no two same virtual hosts  - Every virtaul hosts have own directory: for example: downloads.my-domain.com have own WWW dir: /var/downloads

Can somebody help me? Thanks.

© Server Fault or respective owner

Related posts about apache2

Related posts about debian