Report this

What is the reason for this report?

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

Posted on September 12, 2016

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!



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!

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.

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.

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!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.