Problem with www.doamin.com

Discussion in 'General' started by whyyyhk, Aug 24, 2011.

  1. whyyyhk

    whyyyhk New Member

    Hello,
    I want to create virtual host A with www.domain.com
    and virtual host B with domain.com
    virtual host A and B have different content.
    How can it be done.
    Thanks
  2. webizen

    webizen New Member

    The trick is how to map them to listener.

    Here are the steps:
    1. create vhost A with docroot /path/to/vhostA
    2. create vhost B with docroot /path/to/vhostB
    3. create listener L bind to an IP (assuming domain.com and www.domain.com resolve to same IP*)
    4. map vhost A with domain www.domain.com to Listener L
    5. map vhost B with domain domain.com to Listener L

    * if they resolve to different IPs, you may
    a. create two listeners bind to per each IP and map the vhosts to their respective listeners
    or
    b. create a listener binds to any IP and follow step 4 and 5 mentioned above.

Share This Page