• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

change root directory for apache

N

noworyz

Guest
I want to make the root directory for all my websites to be in the httpdocs/www/ folder instead of just the httpdocs folder. Is this possible and how. In Plesk, where is the document root defined?
Thanks
 
This is not going to be possible.

Plesk is hardcoded to write the httpd.include in a specific format, and that format includes the use of httpdocs as the root of the site.

As an alternative solution, perhaps removing the httpdocs folder and creating a symlink to the location you want to use instead (so if you want to have www in the root of the domain directory /var/www/domain.com/www and then create a symlink from www to httpdocs). Just make sure you sort out the permissions and ownership of the symlink, otherwise things break.

Good luck.
 
I am pretty sure I figured it out. Each domain has a httpd.include file that has the document root defined. You can put this definition in the vhost.conf and it will over ride the default.

I guess my question is, I am used to the htdocs/www for website but why is this different?
 
You are correct, the vhost.conf file is included after so you can override the setting that way.

As for why it is different... Just the way that Plesk decided to do it. Personally I am use to /var/www as that is how Debian does it.
 
I managed to do it as well.
just some directions:

Put the following line in '$DOMAIN$/conf//httpd.include' under the 'VirtualHost' section.

Include /usr/local/psa/home/vhosts/onlinehowto.net/conf/vhost.conf

then create or if exist edit $DOMAIN$/conf/vhost.conf and put the new location of the DocumentRoot folder:

DocumentRoot /whatever/the/new/documentroot/location/is
 
Back
Top