Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2006
    Posts
    2

    ServerAlias limits - many domains

    Not sure of this is the correct forum ,buthere goes.

    We're trying to set up a virtual host with many (50+) domains. In the past I've been successful with 20+ domains within the same ServerAlias directive, but on researching this, I'm seeing different answers. We're running Apache 1.3.33.

    Some places suggest putting all domains in one ServerAlias line (which of course gets doubled by adding the wild card *.domain.com)


    Others say there is a limit and that the solution is to have multiple ServerAlias lines within the same virtual host directive.


    I have looked at the apache.org docs and they don't address this question as to line length or multiple ServerAlias lines.


    The docs do indicate that wild cards are acceptable (and that would help in my situation), but normal wild card usage in these situations is for subdomains, i.e., "domain.com *.domain.com"



    I would need to use "domain*.com *.domain*.com"


    Would anyone know if the latter use is permissible for wild cards in the ServerAlias directive, and especially if one may use two wild cards in the same alias, i.e. *.domain*.com?



    Any thoughts on this? Thanks


    Lappert

  2. #2
    Join Date
    Dec 2005
    Location
    Internet
    Posts
    1,337
    In your case, you can specify wildcards in apache configuration via

    ServerAlias domain*

    OR

    ServerAlias domain*.com

    OR

    ServerAlias dom*.com

    100s of ways

  3. #3
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    *.domain.com should be enough as any.domain.com should work. If you need specifically domain* ie beginning with domain, add as domain*.com
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  4. #4
    Join Date
    Dec 2006
    Posts
    2
    Thanks for the replies. I tried all the domains and it ended up being over 3,000 characters. There's a lot of conflicting information out there on this and the apache docs aren't too clear. Some say there's a limit (one said 4,000 character), some said a mistake would overwrite one's vhosts or httpd.conf. Some said to use multiple ServerAlias lines and others said don't do that.

    In our case we have 50+ domains that our combinations of four words. We started out with word1.com (net org and info). then we added:

    word1word2.com etc
    word1word3.com etc
    word1word2word3.com etc
    word1word3word2.com etc
    word2word4.com etc
    and so on.

    So it's a matter of finding where to put the wild cards that make it all work. Most examples use the wild card for the subdomain, *.domain.com but I haven't seen the wild card used as part of the domain itself.

    Now I'm wondering if wild cards can be used as part of the tld.

    I guess the only thing to do is to try it (of course after backing up the conf files) and see what happens.

    Thanks again.

  5. #5
    Join Date
    Dec 2005
    Location
    Internet
    Posts
    1,337
    Now I'm wondering if wild cards can be used as part of the tld.
    Yes, it is possible to enable wildcard as a part of TLDs. As an example,

    ServerAlias *.com

    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •