domain aliases in virtualmin

9 posts / 0 new
Last post
#1 Wed, 04/16/2008 - 12:14
karl@rince.net

domain aliases in virtualmin

I have no idea whether this is possible, but I'd like to be able to have a primary domain, and a domain alias that basically matches that domain.

e.g. in virtualmin, I have domain abc.com, and I have user accounts x, y and z configured in that domain.

Later on, I buy abc.co.uk, but want this domain's website to be an Apache ServerAlias on abc.com, and for x, y and z to receive all email sent to that domain as well as abc.com.

Is this possible?

Thanks,

Karl Dane

Fri, 04/18/2008 - 13:49
Joe
Joe's picture

Howdy Karl,

This is what Aliases are for, and they do everything you've asked for (mail is optional).

Select the virtual server domain you'd like to make an alias of

Click Create Virtual Server

Click Alias of example.com (at the top of the page)

Fill in the form

Save it

--

Check out the forum guidelines!

Mon, 04/21/2008 - 07:44 (Reply to #2)
backspaces

Should this also work for Mailman lists? I've got an alias VS, which works perfectly for web and individual email accounts, but when using the mailman address "discuss@lists.alias.com", where there is a "discuss@lists.real.com" list, I ran into problems:

Recipient address rejected: User unknown in virtual alias table

Maybe I just need to play a bit with DNS records?

Mon, 04/21/2008 - 13:34 (Reply to #3)
Joe
Joe's picture

No, this isn't a DNS issue. Postfix needs to have aliases for those addresses that points to the mailman addresses. I don't think we've ever had anyone want this, so I don't think there's a way to do it automagically. It would be a feature to add to the Mailman lists module, I think, since it's the only thing that knows about the Mailman virtual maps entries.

If you only have a few such lists and aliases, you could create them manually by copying the existing virtual maps entries and changing the domain to the alias domain. (You'd need to copy all of the listname-*@example.com entries for the list...the delivery field wouldn't change, but the example.com would become your alias domain name.)

--

Check out the forum guidelines!

Thu, 04/24/2008 - 07:41 (Reply to #4)
mattm

<b>Joe wrote:</b>
<div class='quote'>Howdy Karl,

This is what Aliases are for, and they do everything you've asked for (mail is optional).

Select the virtual server domain you'd like to make an alias of

Click Create Virtual Server

Click Alias of example.com (at the top of the page)

Fill in the form

Save it</div>

Is this the same solution for parking a domain over another domain so it resolves? I followed these steps, only to have the domain name i used as an alias show a default apache directory index.

Any help would be appreciated.

Thu, 04/24/2008 - 12:03 (Reply to #5)
Joe
Joe's picture

<div class='quote'>Is this the same solution for parking a domain over another domain so it resolves? I followed these steps, only to have the domain name i used as an alias show a default apache directory index.</div>

Yes, and I'm not sure what to make of the result you got. I can't imagine how this could result in a default directory index unless the virtual server you created an alias of has no content.

Is it possible you've got some IP mismatches going on there? (Specifically, differences between the DNS IP used for the alias vs. the parent virtual server.)

See the troubleshooting guide for some other things to look out for in that regard, specifically in the &quot;Wrong Site Shows Up&quot; section:

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

The web portion of the alias is so simple that it's almost impossible for anything to go wrong. So, the fact that something is going wrong has me a bit flabbergasted. ;-)

In short, it creates a ServerAlias entry within the parent virtual servers VirtualHost section. I can't think of any way for this to go wrong.

And, it creates a record in the parent servers DNS zone file. In this case, as long as the IP matches the parent, I can't think of any way for this to go wrong either...and if it did, it'd probably be a bug.

--

Check out the forum guidelines!

Mon, 04/21/2008 - 14:23
backspaces

No worries, the main thing I needed to know that this is a known issue and I haven't screwed up the installation somehow!

Mon, 06/09/2008 - 05:17
mattm

I'm looking under Webmin &gt; Apache server - I'm not seeing the parked domain (sub virtual domain of domain A) in the list, possibly it's not adding it?

Also, I have a private IP (seperate NIC card) and a public IP that sites resolve on (seperate NIC) Maybe adding more confusing to the virtualmin configs

Mon, 06/09/2008 - 11:38 (Reply to #8)
Joe
Joe's picture

Let's agree on some terminology before we continue the discussion, because I'm getting confused about what you're talking about.

To me, a &quot;parked domain&quot; is merely a server alias. It is a domain name that points to some existing virtual server--but it is not a virtual server itself. An Alias in Virtualmin does two things (and <i>only</i> two things, with regard to web requests):

1. Creates a &quot;ServerAlias alias.domain.tld&quot; directive in httpd.conf within the domain.tld VirtualHost section

2. Creates an &quot;alias.domain.tld&quot; A record in the BIND configuration

A &quot;ServerAlias&quot; directive is <i>not</i> a virtual server, as far as Apache or the Apache Webmin module is concerned. It's just a way for one to say &quot;When someone asks for alias.domain.tld, give them domain.tld. It is not a virtual server, and definitely shouldn't show up in the Webmin Apache module virtual server list.

OK, so that's an alias. But, you're also saying &quot;sub virtual domain&quot;, which I kinda think sounds like you're talking about either a Sub-Server or a Sub-Domain account type (hopefully not the latter, as Sub-Domain account types are confusingly named and are considered deprecated and should be disabled, by default, on Virtualmin Professional systems). But, anyway, a Sub-Server account type <i>is</i> a virtual server type that will show up in Apache, as it is wholly its own virtual server. It gets a VirtualHost section, a content directory, etc. But, if you're just wanting a name to point to existing content--this isn't the kind of account you want! An Alias is for pointing a name to an existing website. A Sub-Server is for creating a whole new website owned by an existing user. Sub-Servers get their own content directory and cgi directory and optionally mailboxes and databases and such.

Given that, let's clarify what you've done:

Did you create an Alias Server or a Sub-Server? (Remember that names don't matter. We don't care if your alias or sub-server is named sub.domain.tld or differentdomain.tld--names don't matter to Virtualmin.)

--

Check out the forum guidelines!

Topic locked