Ok here is my 1st attempt at writing some documentation for the installation of Elgg!
If your control panel is Plesk and you are trying to install Elgg you will need to do the following for it to work correctly.
DO NOT EDIT YOUR HTTPD.CONF File. You may think your changes are saved but within a few hours plesk will automatically overwrite this file with its own. To remove any Open_basedir problems and restrictions you will need to do this per domain.
To define the needed parameters for each domain youw ill need to create or edit your vhost file.
Plesk automatically updates httpd.include for each domain, making changes to this file only temporary. You don’t want to use this file if you need to make changes toApache’s config on the fly, such as php’s open_basedir values per domain.
Instead you will want to use a vhost.conf file. This file will be placed inside your domain’s conf directory, usually found at/var/www/vhosts/mysite.com/conf.
Create a file called vhost.conf in whatever editor you prefer.
Note: If you have a site that has an SSL and you need to have access to directories outside the httpsdocs directory you will need to do the same thing but instead of “vhost.conf” it’s “vhost_ssl.conf”
You can now put in any Apache configuration options like you would into httpd.include.
Now if you’ve been using Plesk for a bit you know that sites are generally kept under the httpdocs directory.
But let’s say you’re installing some online software…like Sugar CRM, Joomla orELGG.
These packages need access to directories outside of the httpdocs directory.
To solve this issue properly in Plesk - you’re supposed to create a vhost.conf file in the conf directory under your site.
Let’s say you did this:
cd /var/www/vhosts/mysite.com
mkdir data
chown myuser:psaserv data
In the site directory you could add the following:
<Directory /var/www/vhosts/mysite.com/httpdocs/>
php_admin_value open_basedir "/var/www/vhosts/mysite.com/httpdocs:/tmp:/var/www/vhosts/mysite.com/data"
</Directory>
Then you would need to force an update in Plesk for this domain using the following command:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=mysite.com
After running that there is no need to restart Apache or any other service. Your changes should have taken effect already.
To get mine working correctly I used this in my vhost.conf file
Directory /var/www/vhosts/yourdomain.com/yourdatadirectory/
php_admin_value open_basedir \ /var/www/vhosts/yoursite.com/httpdocs:/tmp:/var/www/vhosts/yoursite.com/data\
/Directory
On some setups you may want to use this
Directory /var/www/vhosts/yourdomain.com
php_admin_flag engine on
php_admin_value open_basedir none
/Directory
Hope that this helps anyone that may run into this with Plesk Control Panel
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.