Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

closed as off-topic by Jenny D, womble, HBruijn, MadHatter, kasperd Sep 6 '15 at 13:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

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

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