• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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