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

2 hostnames, 2 websites, same domain, not possible?

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by Jayn, Oct 4, 2009.

  1. Jayn

    Jayn Guest

    0
     
    Hi, I've setup a domain in Plesk 9.2.2 we'll call example.com. The plesk server is also the primary DNS server. example.com and www.example.com both land the user at /var/www/vhosts/example.com/httpdocs as expected.

    Now, I want to have a new site: secondary.example.com. If I add this to the DNS for example.com, I can't create a domain of the same name and/or vice versa.

    If I try to create the domain before the DNS it insists on creating a subdomain.

    Is there a more straightforward way to do this?
     
  2. Andrey Kucherov

    Andrey Kucherov Guest

    0
     
    Hello,

    Please clarify what is the purpose of the secondary.example.com - does this should be a subdomain or a separate domain with its own DNS records.
     
  3. Jayn

    Jayn Guest

    0
     
    The purpose is to have a website at secondary.example.com that is different from the website at [www].example.com.

    If I wasn't using plesk, I'd simply add an A record for secondary.example.com in the example.com zone and I'd configure a new virtual host under apache.

    Unfortunately, it's not that simple in Plesk. I don't understand the difference between a subdomain or a separate domain as they both seem to create additional NS records for secondary.example.com under example.com and then creating another zone file, which I seemingly have to setup under my secondary DNS server as well. It seems extremely convoluted. Is this a limitation of using Plesk?

    What is the recommended Plesk approach to this task?
     
  4. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    You'd want to use a subdomain for your configuration, basically that is going to automatically add the A record to the existing example.com TLD and set up a separate httpdocs for secondary.example.com under /var/www/vhosts/example.com/subdomains/secondary/httpdocs/
     
  5. jaydisc

    jaydisc Guest

    0
     
    Hi, that works much more as expected. Thank you.

    For the parent domain, the admin user has an sftp(chrooted) shell as I only like giving users SFTP access (I've disabled FTP). For this subdomain, I can define a user to go with it, but it seems to be limited to FTP. Is this just a limitation of the GUI? Can I go into the back end MySQL or config files to make that user a chrooted SFTP user?

    Alternatively, can I create an ADDITIONAL SFTP user at the parent domain and limit it to the subdomain directory?

    Thanks again.
     
  6. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    Thats just a limitation of the GUI, you can still go into the users home dir to manage keys, permissions, etc and all that the normal way. Personally I use the "scponly" shell, which has its own internal logging and chroot functionality so I end up doing all that manually anyway.
     
  7. jaydisc

    jaydisc Guest

    0
     
    Sweet. Thanks again.
     
Loading...