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

catch-all subdomain How to

Discussion in 'Plesk for Linux - 8.x and Older' started by Johngil, Dec 31, 2005.

  1. Johngil

    Johngil Guest

    0
     
    How can I setup a catch all sub-domain so if I go to "http//anything.mydomain.com" it will point to "http//mydomain.com"
    In the DNS zone I have tried:
    *.mydomain.com. CNAME mydomain.com.
    but it keeps sending me to the Default PLESK Page.

    Please help
    Thanks,
    John
     
  2. mikk

    mikk Basic Pleskian

    23
    73%
    Joined:
    Jan 29, 2005
    Messages:
    83
    Likes Received:
    0
    In conf/vhost.conf add

    ServerAlias *.mydomain.com


    issue a

    websrvmng -u --vhost=mydomain.com

    issue a

    httpd restart

    then should work
     
  3. Johngil

    Johngil Guest

    0
     
    mikk, thanks for the reply. Can this be done from within Plesk, or is there a tutorial or something to show me how to do this.

    Thanks,
    John
     
  4. mikk

    mikk Basic Pleskian

    23
    73%
    Joined:
    Jan 29, 2005
    Messages:
    83
    Likes Received:
    0
    No this will all need to be done from a root level shell.

    Best to have a good search over these forums and get yourself familiar with how wrong things can go if you are not used to using shell commands before trying to make changes.

    The changes i showed though are relativly painless and can be done easily once you are logged in as root.

    The paths you need to use vary depending on the OS you are using hence i only gave an outline, if you post your details im sure someone with the same OS will post more accurate paths to the commands.
     
Loading...