Fully qualified hostname not setup?

When I setup virtualmin, it asks for a fully qualified hostname, which I supply. However, the first virtual server I setup seems to take over that server.


hostname1.com to satisfy install requirements. Browse to hostname1.com and everything is correct.

Create first virtual server virtualserver1.com. Browse to virtualserver1.com and everything is correct, but browse to hostname1.com and it reflects what is on virtualserver1.com.

This only occurs with the aforementioned domains. Any additional virtual servers reflect properly without the above problems.

When I try to create a virtual server using hostname1.com, I get an error about awstats already being setup and it will not complete. Where do I go to see my initial server, it is not under servers.

Thank you.


So, the hostname you set during installation is not a Virtual Server in Virtualmin. It is merely a unique identifier for the server–and it probably shouldn’t be something you plan to use as a virtual server (though it is possible to do so, you just have to modify a couple of things to prevent conflicts).

That said, I’m not sure I understand what problem you’re seeing…what is the exact error you get when you try to create a virtual server on hostname1.com? Was AWStats configured manually in the past for this hostname? Did you previously try to create this virtual server and it failed with some other error? I’m not immediately able to come up with a reason for this error to occur in the circumstances you describe (that’s not to say it can’t happen).<br><br>Post edited by: Joe, at: 2007/08/14 19:20

The exact error is: "Failed to create virtual server : AWstats reporting is already enabled for this domain."

Correct, the hostname put in during setup is not in the virtual servers list. I tried to use localhost during the setup, but it would not allow the install to complete. Should I uninstall and try localhost.localdomain? The hostname I used during install is one I planned on using.

Nothing was configured manually.

This is a fresh install.

The following sites are the ones in question

http://829computers.com - used as fully qualified hostname on install
http://ineedbusinesscapital.com - 1st virtual server

http://arkansascomputerservice.com - 2nd virtual server working correctly as described in OP

I tried to edit my post, said hacking attempt.

If I could just get 829computers.com removed so it could be setup as a VS that would be great, but I am scared to delete to awstats file for that domain for fear that I would break something else.

No, you definitely don’t want to use localhost.localdomain. That’s one of the things we’re trying to prevent during installation.

I should probably explain why a hostname is required, which might make it more clear what you ought to set it to. :wink:

The hostname is automatically picked up by Virtualmin, and several other utilities on the system during configuration and installation. Specifically, Virtualmin uses it for the first NS record in your DNS zones (so, a good name might be ns.domain.tld). Also Postfix requires a FQDN or all of its configuration will fail in subtle or not-so-subtle ways (ns.domain.tld works for postfix too…it doesn’t really care what the name is, it just needs one that isn’t localhost).

But, you don’t need to do anything as complicated as a re-install (and please don’t do a reinstall with localhost.localdomain as the hostname!). We just need to figure out how awstats ended up configured for 829computers.com and get rid of that configuration. It’s probably just something that is setup by default during awstats installation on Debian/Ubuntu (this is a debian-based box isn’t it? RPMs generally refuse to do that kind of modification to configuration files…and ours certainly doesn’t).

Anyway, probably just need to browse to the AWstats module and delete the offending report configuration.

After that, the only other tricky bit is probably that you want to change the hostname. It really can be anything that is a legitimate name. So, ns.829computers.com, main.829computers.com, foo.829computers.com, etc. The reason we don’t generally want it to be 829computers.com is that when you create a new virtual server, it’ll get a virtuals map entry, and postfix will think you’re confused about how mail delivery works. It’ll complain about having the same destination in mydestination and in the virtuals map (it’s a non-fatal error, and mail will be delivered, but it’s pretty chattery).

It is CentOS 5. If there is no easy way to get the names changed over, I do not mind a reinstall, because I would rather it be right the first time, than potential problems arise in the future.

Changed host names and deleted awstats record and the problems have gone away.