Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

But problem what is happening is next, while i using no virtual hosts, everything works perfectly when i accessing it using, but when i add Virtual host, i cann access it but 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, it redirects again to When i delete virtual hosts, access to 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: have own WWW dir: /var/downloads

Can somebody help me? Thanks.

share|improve this question

closed as off-topic by masegaloeh, mdpc, Hyppy, Katherine Villyard, Flup May 1 '15 at 8:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

I fixed it by deleting all exist virtual hosts and manualy adding these code to my httpd.conf for each virtual host:

<VirtualHost *:80>
        DocumentRoot "/var/www/"
        ErrorLog /var/www/error_download.log
        CustomLog /var/www/access_download.log common
        ServerAlias download
        <Directory "/var/www/">
                AllowOverride All

So if you have(or you haved) same problem, just edit these lines to match your own criteria and use it.

You can use this editor/generator which i just created, to customize this code.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.