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 ?

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.

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

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


Ya, I think they are fine.
Ref :

so you have in your directive < virtualhost > ?

that should be < virtualhost >

123 should be your IP where apache runs on

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.

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.

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.

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:

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. : ) .

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?

-Eric unfortunately does not seem to load now . Check and

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.

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 ?

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.

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

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
<Directory ${HOME}/public_html>
Options -Indexes IncludesNOEXEC FollowSymLinks
allow from all
AllowOverride All

<Directory ${HOME}/cgi-bin>
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)

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 …

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.