• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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