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 web2dziner.com using Virtualmin virtual hosts. The problem is when I type http://web2dziner.com (wrong Apache default page ) and http://www.web2dziner.com (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.

http://www.intodns.com/web2dziner.com

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

ServerName web2dziner.com
ServerAlias www.web2dziner.com

Ya, I think they are fine.
Ref : http://download.techdarpan.com/download.php?ScreenShot002.jpg

so you have in your directive < virtualhost web2dziner.com:80 > ?

that should be < virtualhost 123.123.123.123:80 >

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 : http://download.techdarpan.com/download.php?ScreenShot004.jpg
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 ( http://download.techdarpan.com/download.php?ScreenShot005.jpg ) all the domains and subdomains are landing op on http://dbms.web2dziner.com/ . Also when I am restarting Apache after applying the changes the following warning crops up - - > http://pastebin.ca/1499038 . Please help.

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

Listen 74.63.221.173:80

ServerName 74.63.221.173:80

NameVirtualHost 74.63.221.173:80

then restart Apache.

Edit:

Also your hostname isn’t correct.

Primary nameserver: web2dziner.com should be something like Primary nameserver: ns1.web2dziner.com

I had added as per your instructions in web2dziner.com.conf file ( Ref. : http://pastebin.ca/1501107 ) . But after that Apache fails to start ( Ref. : http://pastebin.ca/1501108 ) . What should be my proper hostname and how to rectify it ? It seems that my name servers are fine. ( Ref. : http://www.intodns.com/web2dziner.com ) .

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

-Eric

Pastebin.ca unfortunately does not seem to load now . Check http://pastebin.com/d5df05d91 and http://pastebin.com/d576cade1

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 74.63.221.173:80 with an # in front of the line.

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

To change the hostname you can ssh into the server and type: hostname ns1.web2dziner.com 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: http://pastebin.com/d576cade1 ) . Replacing default by ip address is throwing up the error http://pastebin.com/m50d7f32f . 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 : http://www.intodns.com/web2dziner.com

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 web2dziner.com and recreate it now that bind is correct. this may help also.

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

The zone file is in http://pastebin.com/m450b2f42

webmin - networking - Network Configuration - Host Addresses and Network Interfaces : http://img16.imageshack.us/img16/8015/screenshot003gxy.jpg

Virtualmin - System Settings - Module Config - Networking settings. - http://img9.imageshack.us/img9/1121/screenshot006kgk.jpg
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 : http://img16.imageshack.us/img16/8015/screenshot003gxy.jpg
this must be ns1.web2dziner.com ns1

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

then try the sites again.