The Wrong Site Shows Up

6 posts / 0 new
Last post
#1 Mon, 03/15/2010 - 20:31
midol

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

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

Tue, 03/16/2010 - 15:36
ronald
ronald's picture

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

Tue, 03/16/2010 - 16:38 (Reply to #2)
midol

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

Tue, 03/16/2010 - 17:15
ronald
ronald's picture

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.

Tue, 03/16/2010 - 18:16 (Reply to #4)
midol

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

Wed, 03/17/2010 - 17:50
ronald
ronald's picture

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.

Topic locked