Link to home
Start Free TrialLog in
Avatar of vixiom
vixiom

asked on

Plesk change vhost document root

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
       </Directory>
</VirtualHost>

// 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 :(
ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vixiom
vixiom

ASKER

Awesome, that worked thanks so much.

I actually had to use /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

--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)