Trouble using _ in a sub-server name!

Problem: I created a Virtual Server, Beneath this domain, I attempted to create a sub-server called city_state_dom, or, as Virtualmin “autocompletes”: When I click the “create server” button, I get “Failed to create virtual server : Missing or invalid domain name - only letters, numbers and the dot, dash and underscore characters are allowed”. Virtualmin 3.87.gpl on Ubuntu 10.04.3. Both pretty much “out of the box” in terms of the installation.

I selected Ubuntu as it is one of Virtualmin’s “gold standard” OSs, and I wanted to try Virtualmin out wthout jumping through narrow, flaming hoops to get it to work. So far, I’m glad I did - I’m very impressed with both.

User Experience:
This is my first experience with Ubuntu 10.04.3., though I’ve been using Redhat flavors for about 20 years now. Second experience with Virtualmin - originally kludged together a version onto Mandrake 10.1 official many, many years ago - it was that effort that prompted me to use an “accepted” linux version and the simple install script this time :o). Currently that version is at 3.69.gpl, though it’s pretty much just “hangin’ out there” as I never invested the time to understand it, nor to really do anything with it. I was updating it fairly regularly up to 3.69 just to keep the hackers at bay.

Two competing assuptions so far:

  • a misconfiguration in php is translating the underscore into something unpalatable to Virtualmin
  • underscore is somehow being parsed into some meta-character by the Virtualmin WUI.

Note that creating a sub-server beneath WITHOUT underscores in the name works fine.

The domain I’m working on actually exists in another environment and, rather than having to create a bunch of links to make things work the old way, I’d sort of like the beast to work as I believe it was designed to :o)

Just wondering if anyone else has encountered this and, as a result, can save me the grief of sifting through the system’s guts? Any assistance, comments, or pointers deeply appreciated!


Unfortunately, underscores aren’t actually legitimate characters for a domain name… so Virtualmin is just noticing that character, and preventing you from setting up a Virtual Server with an invalid character.

You can see a Wikipedia article here on what constitutes a valid domain name:

Thanks - that’s actually what I thought; however, the error message I received from Virtualmin led me to believe otherwise. Might I suggest, then, that the error message Virtualmin generated be corrected? It is reproduced below to illustrate (emphasis mine):

Failed to create virtual server : Missing or invalid domain name - only letters, numbers and the dot, dash and underscore characters are allowed

In any case, thanks for clearing up my confusion!