Webserver hijacking default domain

Debian 11 with Virtualmin 7.3-1

Hi, total newbe here to both Debian and Virtualmin.

I set up Debian minimal with Apache. Using the domain name of proxmox112.mydomain.com (my own domain is in use so I have to use a subdomain of it, but this subdomain is running on a different IP), I could browse to proxmox112.mydomain.com and see the default Debian web page served out of /var/www/html.

I then set up a virtual website, test.proxmox112.mydomain.com using the defaults except that I enabled SSL. Now when I browse proxmox112.mydomain.com, it displays what is in test.proxmox112.mydomain.com and I am not sure why. test.proxmox112.mydomain.com itself looks fine. Can anyone help? I see nothing in sites-available referring to the default domain.

I am wondering if I should change the default template to use “Creating ProxyPass virtual host” but I am not sure. I have changed this setting, but how do I reflect it back into an already created host?

[edit]
I think the server was created as a Top Level Server. Perhaps I have to create another one for proxmox112.mydomain.com?
[/edit]

@NickJH,

It’s most likely because while both are pointed to the same IP address, you ONLY have the “test” one setup in Apache (you created a Virtual Server for it) and therefore now it’s the default domain.

You can setup another Virtual Server for “proxmox112” and it’ll then resolve to it’s own page.

*** Professional, Affordable, Trusted Technical Assistance – tpnAssist.com ***

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.