Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Can I permanently change the "httpdocs" in Plesk?

I want the DocumentRoot to change from /var/www/vhost/<domain>/httpdocs to /var/www/vhost/<domain>/web/htdocs

At the moment I am making the changes in /conf/vhost.conf then updating /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

but that takes a few minutes per domain, and I have to do it for every domain I add that uses my software I've developed.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Beware of editing Plesk files (even apache configs) - many are auto-generated and will be written over by Plesk at some stage.

A simple solution (although one that will slow apache slightly) would be to enable symlinks in httpd.conf and symlink (notice no trailing slashes!):

ln -s /var/www/vhost/<domain>/web/htdocs /var/www/vhost/<domain>/httpdocs 

To automate this (inclusive of creating new dir and moving, if required):

for i in $(find /var/www/vhosts/ -maxdepth 1 -mindepth 1); do 
  mkdir "$i/web" 
  mv "$i/httpdocs" "$i/web/htdocs"
  # create the symlink
  ln -s "$i/web/htdocs" "$i/httpdocs"

The other option is to create vhost.conf files for each domain and load them into the config, there's a walkthrough here.

share|improve this answer
Thanks for your input. –  Laykes Oct 4 '10 at 14:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.