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

How do I point domain to local domains htdocs?

Discussion in 'Plesk for Linux - 8.x and Older' started by Van G, Oct 18, 2006.

  1. Van G

    Van G Guest

    0
     
    I have abc.com and def.com created in Plesk. I use unique email accounts on both domains but they share the same web docs.

    How can I change the Document Root dir of abc.com to def.com?

    When someone enters abc.com they automatically go to def.com's htdocs dir.
     
  2. Beto

    Beto Guest

    0
     
    Hi,

    I don't know if it's possible but in the conf directory of the domain you have an httpd.include.

    Maybe if you change the path of the httpdocs here, it will be directed to the other domain.

    I've never tested it but try it out :)

    (/var/www/vhosts/domain.tld/conf/httpd.include)
     
  3. Van G

    Van G Guest

    0
     
    Thanks for the reply. Top of the file you mentioned contained this:

    # ATTENTION!
    # DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
    # FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
    # MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
    # FOLLOWING FILE(S):
    # /var/www/vhosts/domain.tld/conf/vhost.conf
    # /var/www/vhosts/domain.tld/conf/vhost_ssl.conf
    # /var/www/vhosts/domain.tld/subdomains/<subdomain-name>/conf/vhost.conf

    However, those files don't exist!

    httpd.include did have the VirtualHost config information in it, and then some.
     
  4. jwdick

    jwdick Guest

    0
     
    That's correct, the files do not exist by default, you have to create them. Any changes made to http.include will be lost with the next Plesk update. Once you create the vhost.conf file, run:

    /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domainname

    This will place an "include" statement in httpd.include and Plesk will leave it alone.
     
  5. Van G

    Van G Guest

    0
     
    Jack, would there be any issue in changing the document root folder of one domain to another in the httpd.include file?
     
Loading...