Alias creation against server using non default shared IP

Hi there.

I have a server setup as follows.

domain1.co.uk
domain2.co.uk
domain3.co.uk

All of the above domains are set against a non-default shared ip address, and seem to work correctly. domain1.co.uk is the default website for the IP.

I am trying to add an alias to domain2.co.uk.

I have created the alias domain2a.co.uk against domain2.co.uk, and updated the dns records against it at the registrar.

When accessing domain2a.co.uk, it actually goes to domain1.co.uk

What have I done wrong?!

Thanks,
Craig

Common problem:

https://www.virtualmin.com/documentation/web/troubleshooting#toc-the-wrong-site-shows-up-V5JtxdKg

Short answer:

All VirtualHost sections in the Apache configuration need to have the IP:port, rather than *:port.

Thanks Joe.

I think i made the mistake when creating the alias of not enabling the Apache website!

I’ve enabled this and it seems to work now