• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Changing default DocumentRoot directory

A

arya

Guest
Hi, any body knows how to change default DocumentRoot directory (currently at httpdocs) in vhost.conf (as I am not suppose to touch httpd.include)? I want to change default DocumentRoot directory for one of the domain, but I am not sure if I can change DocumentRoot for one domain and not affecting others. Please help. Thanks
 
re:

Ok, guys I did it. I went ahead and changed it in httpd.include (I was kind of desparate). I also changed owner and group, its working ok but there is one problem. All my files (web page) have .php extention and only html part of the files are showing up. Looks like this folder (one I created) can’t relate itself to php. Any I idea how can I fix that problem? Thanks
 
That's not the best way to do it for obvious reasons :)

Your vhost.conf file will need to look like this:
Code:
DocumentRoot /path/to/new/documentroot

<Directory /path/to/new/documentroot>
   php_admin_flag engine on
   php_admin_flag safe_mode on
   php_admin_value open_basedir "/path/to/new/documentroot:/tmp"
</Directory>
The DocumentRoot directive in vhost.conf will override the one in httpd.include. Also, look at what's in the <Directory /old/path/to/documentroot> section in httpd.include - this basically needs to be copied into the new <Directory ...> section above.

Actually, thinking about it, it would probably be a lot easier to remove the httpdocs directory entirely and create a symbolic link to the new path.
 
re

Thanks a lot buddy, actually I did change it, based on my guess and it is working fine. But I didn’t create the file vhost.conf, (as I had no clue about format of the vhost.conf file), I directly made change in httpd.include file. Thanks for your reply, now I know how vhost.conf should look like.

As for symbolic link, I don't know how it should be done. Is it possible to give an example. Thanks
 
Well, basically, you'd remove any custom changes in your vhost.conf file and remove the httpdocs directory entirely. Then you'd run ln -s /path/to/new/documentroot httpdocs which will create the link.

This way Apache will still read from /path/to/old/documentroot and all the <Directory ...> settings will apply correctly, but the files are actually stored on the new path.
 
RE:

WoW! Great! That’s a totally new stuff for you. Thank you soo much. There are lots to learn from you.
 
Back
Top