Hosting Multiple Websites using Webmin & Ubuntu 14.05 - Additional Domains Redirect To Primary Domain

Hello. I’m needing some help here. Using Ubuntu 14.05 with Webmin installed to run the control panel side of things. When setting up a virtual host for websites, I point the domain A record at the server address, add a new virtual host. I can then view the website using chrome. I then add the second website pointing to its own folders. when I use a browser to view my second domain it redirects to the first domain. I don’t know if this makes any sense? I am a slight newbie to this and would be grateful for a few pointers! Apologies if this has already been asked elsewhere


Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Thanks for your speedy response! I have virtualhost config below:

<VirtualHost xxx.xx.xx.x> DocumentRoot /var/www/html/capriequip ServerName ServerAlias * <Directory “/var/www/html/capriequip”> allow from all Options None Require all granted </Directory> </VirtualHost> <VirtualHost xxx.xx.xx.x> DocumentRoot “/var/www/html/alexlyon” ServerName ServerAlias * <Directory “/var/www/html/alexlyon”> allow from all Options None Require all granted </Directory> </VirtualHost>

I have changed the IP address…

The first domain is and the second is The second loads the first domain when viewed in a webpage

Thanks in advance!

I would recommend reviewing this tutorial which covers setting up Apache virtualhosts without webmin. You can use webmin to directly edit your configuration files. If you can share your current virutalhost configuration for the two domains I’d be happy to help you identify the problem.