• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

How do I point domain to local domains htdocs?

V

Van G

Guest
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.
 
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)
 
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.
 
Originally posted by Van G
# 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!

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.
 
Jack, would there be any issue in changing the document root folder of one domain to another in the httpd.include file?
 
Back
Top