Trouble using _ in a sub-server name!

3 posts / 0 new
Last post
#1 Mon, 09/26/2011 - 11:59
TheJanitor

Trouble using _ in a sub-server name!

Problem: I created a Virtual Server, domain.net. Beneath this domain, I attempted to create a sub-server called city_state_dom, or, as Virtualmin "autocompletes": city_state_dom.domain.net. 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. Backgound: 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.

Assumptions: 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 doamin.net WITHOUT underscores in the name works fine.

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

Plea: 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!

Mon, 09/26/2011 - 13:07
andreychek

Howdy,

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:

http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names

Mon, 09/26/2011 - 16:08 (Reply to #2)
TheJanitor

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!

Topic locked