The Wrong Site Shows Up

Hi,

I recently added a site to my existing VMPro installation and it doesn’t resolve properly, instead of childfocusafrica.org, I get choked.ca, which is the first entry in the vhosts part of the httpd.conf file.

There is an existing post from '08 with the same title I’ve used here. I read that thread and it doesn’t seem to apply. Also there is a legacy doc that suggests three things to check. This is at:

http://www.virtualmin.com/documentation/id,troubleshooting_common_problems/

I’ve checked the network interface data and it seems unexceptional:

[admin@cserver conf]$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:02:55:16:EC:F7
inet addr:192.168.0.253 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::202:55ff:fe16:ecf7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:11402658 errors:0 dropped:20 overruns:0 frame:0
TX packets:15111011 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1407787335 (1.3 GiB) TX bytes:3382112164 (3.1 GiB)
Interrupt:185 Base address:0x2000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4878148 errors:0 dropped:0 overruns:0 frame:0
TX packets:4878148 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2000633852 (1.8 GiB) TX bytes:2000633852 (1.8 GiB)

and I looked for namevirtualhost and virtualhost directives and get:

NameVirtualHost 192.168.0.253:80
NameVirtualHost 192.168.0.253:443

<VirtualHost 192.168.0.253:80>

and that seems ok to me. The third point about not using * for an ip address seems to me also to not apply.

I don’t know where to look now. Suggestions?

Dave

whichever site you want to be default, it needs to be first in the virtualcontainer in the httpd.conf
also in virtualmin Pro you can choose the domain you want to be default, click Server Configuration, click Website Options, in the right pane click Default website for IP address? to Yes

When I log in as server owner and go to Server Configuration, then Website Options I get these lines:

Website matches all sub-domains? Yes No
Default website for IP address? No, default is choked.ca

But the second line, where the default site is set is not clickable, seems to be only informative. The first line has “yes” ticked to match all sub-domains. Ideas?

d

select choked.ca then go to website options and set it to No for Default website.
Then go to the domain you do want to be the default and go through the process to enable it as so.

choked.ca/defaultsite.png shows the screenshot. I don’t see an option for the default site just the setting. Is it the option for matching all sub-domains?

Dave

i dont see a screenshot. but its not the option for matching all sub-domains. It is Default website for IP address?
you can move the preferred domains as the first virtual container in your httpd.conf.
that will solve it too.