Website not resolving properly.

25 posts / 0 new
Last post
#1 Thu, 07/16/2009 - 23:02

Website not resolving properly.

I have installed Virtualmin 3.703.gpl module in my Webmin 1.480 panel of my Ubuntu 9.04 HyperVM VPS . Now I have added 1 domain named using Virtualmin virtual hosts. The problem is when I type (wrong Apache default page ) and (the desired page) , it goes to two different webpages. I haven't done any modifications as such directly to the Apache. How to fix it ?

Fri, 07/17/2009 - 02:28
ronald's picture

I have noticed that this is often due to propagation.

In your case it may be due to DNS problems.

You can check this and then correct it on your server.

is that company still using Hypervm? o boy.

Fri, 07/17/2009 - 05:09

I have fixed it and done customery procedures like restarting bind and apache. But the problem still remains....

Fri, 07/17/2009 - 05:30
ronald's picture

Is your virtualhost container correct? In the Apache config..Directives

ServerName ServerAlias

Fri, 07/17/2009 - 05:39 (Reply to #4)
Fri, 07/17/2009 - 09:10
ronald's picture

so you have in your directive < virtualhost > ?

that should be < virtualhost >

123 should be your IP where apache runs on

Fri, 07/17/2009 - 11:49 (Reply to #6)

If I change the directives to that IP address , though the previous problem is solved all my subdomains starts landing up on my main/primary domain !!! Ref : P.S. : I have reverted back to my old settings.

Fri, 07/17/2009 - 15:37
ronald's picture

that's because your subservers are also not correctly setup. you need to have an IP there, not a * and not the domain name.

namebased hosting means many names on 1 IP, but Apache needs to know about that IP specifically.

Fri, 07/17/2009 - 23:35 (Reply to #8)

Sorry , if you want to mean this ( ) all the domains and subdomains are landing op on . Also when I am restarting Apache after applying the changes the following warning crops up - - > . Please help.

Sat, 07/18/2009 - 03:37
ronald's picture

in your apache config file prior to the virtualhost containers you need:




then restart Apache.


Also your hostname isn't correct.

Primary nameserver: should be something like Primary nameserver:

Mon, 07/20/2009 - 08:43 (Reply to #10)

I had added as per your instructions in file ( Ref. : ) . But after that Apache fails to start ( Ref. : ) . What should be my proper hostname and how to rectify it ? It seems that my name servers are fine. ( Ref. : ) .

Mon, 07/20/2009 - 09:44

Unfortunately, I'm getting a 500 Error when going to your links... can you paste in the error message you're receiving when attempting to start up Apache?


Mon, 07/20/2009 - 10:00 (Reply to #12)
Anirban1987 unfortunately does not seem to load now . Check and

Mon, 07/20/2009 - 11:45
ronald's picture

Im not too familiar with debian way but I assume there should be an IP here instead of default < VirtualHost default:80 >

You could comment out the: ServerName with an # in front of the line.

I suspect that is why apache won't restart as the line: Listen is first in the config.

To change the hostname you can ssh into the server and type: hostname then it'll be the same as your mentioned nameserver. In debian one should edit the hosts file I think but Eric can advice better in this.

Mon, 07/20/2009 - 20:54 (Reply to #14)

Unfortunately , none of your above advice is giving results and the displayed error is same error ( Ref: ) . Replacing default by ip address is throwing up the error . Please help. Do one has to go through such troubles after adding a domain using Virtualmin Server module in Usermin ?

Tue, 07/21/2009 - 02:37
ronald's picture

no one should have to go through trouble, but your system or at least a part of it hasn't been set up correctly. That is what you need to fix first and you haven't.

1 your hostname isn't correct (see SOA in the zonefile)
2 there are no A records (Glue) for your domain.
3 serialnumber should be datebased

I suggest to fix these BIND/dns issues first (as mentioned in my first reply) and then see what the sites will do.

Also it seems virtualhost_default:80 in the container is correct, like said I'm not too familiar with the debian way, it is different than centos. I thought it was worth a shot though.

Wed, 07/22/2009 - 03:39 (Reply to #16)

I have sorted out all Bind/DNS issues. Still the same problem remains Ref :

Wed, 07/22/2009 - 11:19
ronald's picture

yes the BIND part is good now so that you can rule out.

second is to look at webmin - networking - Network Configuration - Host Addresses and Network Interfaces, to make sure that is not an issue.
Compare and check it against Virtualmin - System Settings - Module Config - Networking settings.

when this is correct, then it would leave Apache, check
Virtualmin - System Settings - Server Templates and in the template you use, go to Apache website and see if nothing out of the ordinairy is in the first box. below is mine:

ServerName ${DOM}
ServerAlias www.${DOM}
DocumentRoot ${HOME}/public_html
ErrorLog /var/log/virtualmin/${DOM}_error_log
CustomLog /var/log/virtualmin/${DOM}_access_log combined
ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5

Options -Indexes IncludesNOEXEC FollowSymLinks
allow from all
AllowOverride All

allow from all

Now, Debian has a different way of using Apache which I am not too familiar with. It is the sites-enabled and sites-activated I think. With that part I can't help and I hope Eric will check back with you if the above doesn't fix it.

Lastly after checking and per haps reconfiguring the above, you could delete the virtual server and recreate it now that bind is correct. this may help also.

To be sure, can you post your zone-file for ? (Im out for 24 hours so I cant reply sooner)

Wed, 07/22/2009 - 11:47 (Reply to #18)

The zone file is in

webmin - networking - Network Configuration - Host Addresses and Network Interfaces :

Virtualmin - System Settings - Module Config - Networking settings. - I don't think they mismatch , not sure though ...

Virtualmin - System Settings - Server Templates - Apche - Mine is exactly same as of yours...

My luck is really bad ...

Wed, 07/22/2009 - 22:24
ronald's picture

webmin - networking - Network Configuration - Host Addresses and Network Interfaces : this must be ns1

just change the entry and hit save. in the main screen, do not click Apply configuration.

then try the sites again.

Wed, 07/22/2009 - 22:37 (Reply to #20)
Thu, 07/23/2009 - 04:52

Paste the here to look what is happened. This should be:

Thu, 07/23/2009 - 10:15 (Reply to #22)

My paste is in Replacing the default with my ip address is resolving the www problem but another problem is cropping up. All my subdomains are landing up to the main home page .... I am also pasting the of one of my subdomain like --- > . I tried my luck by replacing the *:80 by my ip address . But then when I am restarting apache it is throwing up an error --- > . Currently I am reverting back to my settings as it was earlier to the testing ..

Thu, 07/23/2009 - 10:35

After reverting back to my old settings after being unable to sort out the problem as per instructions from dean1979 i.e. replacing the ip address by "default" the problem seems to be gone now .... Subdomains are also working properly ... Magic magic ... hand of god it seems so.

Thu, 07/23/2009 - 11:27
ronald's picture

nah it was your hand by fixing several issues on your box, dns issues, hostname issues, resolve issues.

After correcting the network settings and restarting apache things started to fall in place. It's nothing magical, but it's technical.

Good that it is solved now, including the errors you didn't know about ;)

Topic locked