1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Wildcard DNS (virtual subdomain) and domain alias

Discussion in 'Plesk for Linux - 8.x and Older' started by JHB Oosterlaar, Jul 9, 2007.

  1. JHB Oosterlaar

    JHB Oosterlaar Guest

    0
     
    Hi,

    We are developing a website that supports multiple languages and is basically a 'network' of subdomains.

    This 'network' of subdomains is supported by implementing wildcard DNS and the multiple languages are based on a domain alias implementation, where the selection of the language to offer is based on the top level domain.

    Both implementations work individually as expected, but together they don't seem to go hand in hand. The request fails, when I request a page within a virtual subdomain through a domain that is set up as an alias. The webserver return the message that the page does not exsist.

    How can I make this work? How can I let the webserver know, that it needs to 'alias' the virtual subdomains, as well?

    Thanks very much in advance!

    Kind regards,

    Jeroen Oosterlaar
     
  2. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    Put ServerAlias *.domain.com in the domain's webserver config (using a vhost.conf file).
     
  3. JHB Oosterlaar

    JHB Oosterlaar Guest

    0
     
    I already did that and the wildcard DNS implementation works fine by itself. However, it fails in the combination with the domain alias.

    Please note the following example.

    There are two domains:
    1. thedomain.nl
    2. thedomain.com

    Thedomain.nl is the main 'platform' on which the websoftware runs. Thedomain.com is set up as a domain alias for thedomain.nl, so every request to thedomain.com is redirected to thedomain.nl. Based on the top level domain, the software offers the content in a specific language (.nl -> Dutch / .com -> English). This works perfectly.

    Furthermore, some components of the website (structure) have their own subdomains:

    For example:
    1. sub1.thedomain.nl (sub1.thedomain.com)
    2. sub2.thedomain.nl (sub2.thedomain.com)
    3. sub3.thedomain.nl (sub3.thedomain.com)

    I have used wildcard DNS to redirect all subdomain requests to thedomain.nl. Again, this works fine.

    However, a request results in a 'page not found' error, when it is send to a subdomain of the domain alias, for example sub2.thedomain.com. So, apparently, the (web)server cannot succefully redirect the request to thedomain.nl, as the combination of the wildcard DNS and domain alias fails.
     
  4. JHB Oosterlaar

    JHB Oosterlaar Guest

    0
     
    I have solved it :). I had to add a line to the vhost.conf file of thedomain.nl. Now, this file contains the following two lines:

    ServerAlias *.thedomain.nl
    ServerAlias *.thedomain.com
     
Loading...