Incorrect domain, My main domain shows up.

15 posts / 0 new
Last post
#1 Tue, 03/03/2009 - 00:09
southerns

Incorrect domain, My main domain shows up.

Hi

When i go to a newly created domain my main domain shows up.

I understand this is most probably due to there being a mismatch between the NameVirtualHost and VirtualHost sections of your Apache configuration.

Where do I go to check NameVirtualHost Where do I go to check VirtualHost<br><br>Post edited by: southerns, at: 2009/03/03 00:09

Tue, 03/03/2009 - 00:40
ronald
ronald's picture

webmin-servers-apache webserver and go to configuration - edit configurstion or click on the 'virtual server' to edit only the specific domain

if the newly created domain has not propagated yet or you typed in a incorrect url then apache would take the first domain listed in the virtualhost section.

Tue, 03/03/2009 - 06:23 (Reply to #2)
southerns

I already took a look there and all seems to be correct,
as I have had this problem before.

Tue, 03/03/2009 - 06:32 (Reply to #3)
southerns

Update:

I noticed that I can ftp to the domain at

ftp.domain.com

I can also log into the webmin at

domain.com:10000

Any ideas?

Tue, 03/03/2009 - 08:22 (Reply to #4)
Joe
Joe's picture

FTP and Webmin are irrelevant to this issue. ronald is correct about the most likely cause.

It's pretty much always mismatched NameVirtualHost and VirtualHost sections, or you have a * in one or both of those sections (which <i>can</i> work in very simple cases, but nobody <i>ever</i> gets it right, so I strongly discourage it's use).

Read this and if you still don't see the trouble, come back with the relevant sections of your httpd.conf, and we'll tell you how to fix it:

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

--

Check out the forum guidelines!

Tue, 03/03/2009 - 08:36 (Reply to #5)
southerns

Hi

I have read it a few times before, but it does not tell you where to find the NameVirtualHost and VirtualHost sections

I have had this problem before but cant remember where and how it was fixed.

I have a client waiting on his domain,
which seems to be right,
but I guess something is sill wrong.

Tue, 03/03/2009 - 08:42 (Reply to #6)
Joe
Joe's picture

<div class='quote'>I have read it a few times before, but it does not tell you where to find the NameVirtualHost and VirtualHost sections</div>

You haven't mentioned your OS, which determines where this configuration happens. It's in httpd.conf on Red Hat based systems, and somewhere in /etc/apache2 on Debian/Ubuntu systems, and somewhere in /usr/local/etc/apache22 on FreeBSD, etc. etc.

The actual root cause is misconfiguration in Virtualmin, though. The documentation I just linked explains where those options are in Virtualmin's Module Config. If you configure Virtualmin correctly, it will not create VirtualHost sections that don't work right...so, fix your configuration, and recreate the problem virtual server, and all will be well.

--

Check out the forum guidelines!

Tue, 03/03/2009 - 18:15 (Reply to #7)
southerns

I am using CentOS Linux 5

Tue, 03/03/2009 - 19:04 (Reply to #8)
andreychek

Okay, on CentOS all of the options you mentioned would be setup in the /etc/httpd/httpd.conf file.

Or, as Joe said, you could use Virtualmin to make those edits, by going into Webmin -&gt; Servers -&gt; Apache website, and getting at the config files from there.

You'd want to make sure that the NameVirtualHost and VirtualHost options were explicitly setting an IP address, rather than using &quot;*&quot; as we've seen on a few systems here and there. The &quot;*&quot; generally just causes trouble :-)
-Eric

Wed, 03/04/2009 - 05:26 (Reply to #9)
southerns

I totally removed the domain from the server.

I have now manually added it to:

Apache server &amp;
Bind server

It now shows up correctly displaying the correct domain.

But yes there is a but:

It does not show up now in the virtualmin domain drop down selection.

Where and how do I edit this.

Wed, 03/04/2009 - 06:40 (Reply to #10)
Joe
Joe's picture

<div class='quote'>I have now manually added it to:

Apache server &amp;
Bind server</div>

Wait, why? That's not what we suggested at all.

I recommended you correct your Virtualmin configuration (with pointers to the docs on how and where to do that), and then recreate the domain (in Virtualmin, of course!).

--

Check out the forum guidelines!

Wed, 03/04/2009 - 19:52 (Reply to #11)
southerns

It would not allow me to create any domain at all.

And there is someone waiting for this domain.

The configuration was working before and nothing was changed.

I will try that and see how it goes.

Thu, 03/05/2009 - 08:17 (Reply to #12)
southerns

Ok I manually removed the domain.

Created it again in virtualmin and after
a few minor setting corrections works fine now.

I am going to go over the servers settings again as I seem to always have to change a few things when I create a new Virtual Server.

Is this normal?

Thu, 03/05/2009 - 09:15 (Reply to #13)
andreychek

Hi there,

What is it that you're finding you need to change in the Virtual Servers you setup?
-Eric

Thu, 03/05/2009 - 09:38 (Reply to #14)
Joe
Joe's picture

<div class='quote'>I am going to go over the servers settings again as I seem to always have to change a few things when I create a new Virtual Server.

Is this normal?</div>

No. Not even a little bit. ;-)

Look over your Server Template(s), and the Module Configuration. Pretty much everything that gets setup during creation is configurable, so if you don't like what the virtual servers look like when they are created, it means you haven't configured Virtualmin to do what you want. ;-)

--

Check out the forum guidelines!

Topic locked