Plesk change vhost document root

Posted on 2006-03-24
Last Modified: 2008-08-11
I'm running plesk reloaded on linux and I'm trying to get CakePHP (PHP version of Ruby on Rails) running on a virtual host. The only thing you need to do to get Cake running under a regular Apache install (which I have on my local mac) is to change httpd.conf's Document Root to be Cake's webroot (/cake/app/webroot) like so...

// code start

<VirtualHost *:80>
    ServerAdmin user@<domain>.com
    ServerName <domain>.com
    DocumentRoot /Library/WebServer/Documents/<domain>/cake/app/webroot
    ErrorLog /Library/WebServer/Documents/<domain>/logs/<domain>.com-error_log.log
    CustomLog /Library/WebServer/Documents/<domain>/logs/<domain>.com-access_log.log common
       <Directory /Library/WebServer/Documents/<domain>/www>
         Options Indexes ExecCGI FollowSymLinks MultiViews
         AddHandler cgi-script .cgi
         AllowOverride all
         Order allow,deny
         Allow from all

// code end

I know in Plesk that there's no httpd.conf file but rather a httpd.include file in each virtual host's conf directory with is generated by Plesk and that if you want to make any changes to your environment you create a vhost.conf file. My question is what goes in that vhost.conf file to change the document root? And how does Plesk know that it should be reading vhost.conf rather than httpd.include?

The frustrating thing is I've done something similar to change the PHP environment for one of my virtual hosts and I know you had to use something like "webservmng -vhost --something" to let it know to use the vhost.conf file. I only get my hands dirty with Apache/Unix commands about twice a year so it's like starting from scratch each time :(
Question by:vixiom
    LVL 27

    Accepted Solution

    websrvmng --reconfigure-vhost

    > what goes in that vhost.conf file to change the document root?

    try to use the DocumentRoot directive
    DocumentRoot /path/to/your/new/root
         <Directory  /path/to/your/new/root>
             # do you really need all options?
             Options Indexes ExecCGI FollowSymLinks MultiViews
             AddHandler cgi-script .cgi
             # are you using .htaccess files? if not, set it from all to none
             AllowOverride all
             Order allow,deny
             Allow from all
    LVL 1

    Author Comment

    Awesome, that worked thanks so much.

    I actually had to use /usr/local/psa/admin/sbin/websrvmng -u

    --reconfigure... threw an error.

    Don't know why I couldn't find simple info like that on Google or the Plesk site (my hosting tech help also didn't live up to their name)

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now