• 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.

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