Change IP of virtual server, points to other domain

Hello,

I got a new IP because I want to install a dedicated SSL Cert on a domain.
I did the following:

  • Select virtual server
  • Server Configuration => Change IP Address
  • selected “use private IP” and filled in the IP address pointed to my server.
  • change now

Note: I did not create a new network interface, Virtualmin did that for me.

Now when browsing the site it points to another domain (the first domain installed on the server).
Document root for the actual site is /home/fraksken/public_html
document root for the other domain is /home/gsdd/public_html

I checked the httpd.conf and found that the IP was not added as NameVirtualHost. So I added following lines
NameVirtualHost XX.XX.XX.XX:80
NameVirtualHost XX.XX.XX.XX:443

After restarting the httpd server there was no change.

Does anybody have an idea how to solve this?

Take a look at “Webmin -> Servers -> Apache Webserver”. Is the domain listed there with the correct IP and port 80? Does the domain name resolve to the correct IP address?

The IP corresponds with the correct IP and port.
I can’t say at this point if the domain resolves to the correct IP. The nslookup function is blocked here.
For some reason there also seems to be something wrong with the dns server (see thread https://virtualmin.com/node/32223). I think, but I am not sure that these 2 issues are unrelated.

Okay, without knowing for certain that the hostname resolves to the correct IP, it’s no use trying to debug a problem with Apache. You should get the DNS working properly first.

yep. The whole issue is because the DNS was not working properly.
Thanks for pointing it out.
Everything is working now.