Question

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

Thanks!

Subscribe
Share

Hello - yes i have virtualmin installed. I built the server from this tutorial.

Do you have Virtualmin installed? How did you build your server? did you used a tutorial?


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

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.

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

<VirtualHost xxx.xx.xx.x> DocumentRoot /var/www/html/capriequip ServerName capriequipment.com ServerAlias *.capriequipment.com <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 alexlyon.biz ServerAlias *.alexlyon.biz <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 www.capriequipment.com and the second is www.alexlyon.biz. 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.