2004-07-01_PICT0044 2004-07-01_PICT0055 2004-07-02_PICT0074 2004-07-02_PICT0077 2004-07-03_PICT0113 2004-07-03_PICT0137 2007-03-20_DSCN0061 2007-03-22_DSC_0043 2007-03-22_DSC_0081 2007-03-22_DSC_0186 2007-03-22_DSC_0188 2007-03-22_DSC_0195 2007-03-22_DSC_0250 2007-03-23_DSC_0067 2007-03-23_DSC_0072 2007-03-23_DSC_0265 2007-03-23_DSC_0277 2007-03-23_DSC_0278 2007-03-23_DSC_0305 2007-03-23_DSC_0333 2007-03-28_DSC_0014 2007-03-28_DSC_0037 2007-03-29_DSC_0029 2007-03-29_DSC_0129 2007-03-29_DSC_0202 2007-03-30_DSC_0068 2007-04-05_DSC_0051 2007-04-06_DSC_0217 2007-04-07_DSC_0003 2007-04-07_DSC_0068 2007-04-15_DSC_0049 2007-04-15_DSC_0050 2007-04-18_DSC_0133 2007-04-18_DSC_0146 2007-04-18_DSC_0160 2007-06-15_DSC_0279 2007-06-15_DSC_0334 2007-06-15_DSC_0578 2007-06-16_DSC_0608 2007-07-07_DSC_1175 2007-07-08_DSC_1326 2009-03-29_dsc_2149 2009-03-29_dsc_2154 2009-04-09_dsc_2228 2009-05-03_dsc_2319 2009-05-07_dsc_2351 2009-06-02_dsc_2407 2009-06-02_dsc_2445 2009-06-02_dsc_2454 2009-06-02_dsc_2463 2009-06-03_dsc_2649 2010-09-27_DSC_2802 2010-09-27_DSC_2820

Owncloud is a web based, open source cloud storage application that allows anyone to host their own cloud service.  By hosting your own service rather than using a commercial cloud service you and your clients maintain control over your data and personal information.

I'm sure there are numerous ways to install Owncloud on a server running Plesk 11 with Red Hat/CentOS 6.x but here is how I did it.  The key focus of my approach is to take advantage of the Plesk infrastructure as much as possible and minimize any custom changes outside of Plesk.

Some of the advantages of this approach are:

  • By staying within the Plesk environment you take advantage of Plesk's management of the environment (Apache, PHP, FastCGI, etc) while avoiding any unintended conflicts with Plesk.  I've used Plesk for quite a few years and although it's more forgiving than it used to be I still find that configuration changes made outside of Plesk can cause problems, especially during updates/upgrades.
  • You can use the Plesk Backup Manager to backup the Owncloud installation and restore to multiple servers making it much easier to set up Owncloud on a new server.
  • The same approach can be used for Windows and Linux servers.

This procedure should work for Plesk 10 and Red Hat/Centos 5.x but I haven't tested it.  It should even work for Windows servers (again, I haven't tested it).

 

  1. Login to the Plesk control panel and create a new subscription with the following values:

    OCAddSubscription



  2. Open the control panel for owncloud.local and create a database and database user with the following values:
    Database name: owncloud_local
    User name: owncloud_local
    


  3. Create a domain alias for one of your existing domains such as owncloud.yourdomain.com to owncloud.local.

    OCAddDomainAlias1

    OCAddDomainAlias2

    If you do not have a wildcard DNS entry then you will have to create an A record for the owncloud.yourdomain.com alias you just created.


  4. Upload and extract the latest Owncloud into the httpdocs directory.  In your browser, go to owncloud.yourdomain.com and complete the installation.  Click on the Advanced options to configure the MySQL database.  For any installation problems/questions please refer to the Owncloud admin manual and user support forums.


  5. (Optional) If you want to allow users to login with their IMAP credentials then follow the instructions in the Owncloud manual - Custom User Backend Configuration.  If you get an error indicating that there is a problem finding the OC_User_IMAP class or have difficulty using the WebDAV/CalDAV/CardDAV links provided in the Owncloud interface then adding the following line to the top of the config/config.php immediately after the <?php (courtesy of this wiki) should resolve the problem:
    require_once(dirname(__FILE__).'/../apps/user_external/lib/imap.php');

 

Now that you have a working Owncloud installation you have three options to set up Owncloud for the other domains on your server.

 

OPTION 1 (good):

Have all the users on your server use the owncloud.yourdomain.com URL.

If you want to force access over HTTPS then copy the contents of the htaccess file attached to this article to top of the existing .htaccess file in the owncloud.local httpdocs directory.

 

OPTION 2 (better):

Set up additional owncloud.* domain aliases to owncloud.local for each domain that you want to use Owncloud with.  For any domains that do not have a wildcard entry in their DNS you will need to create an owncloud A type record.

If you want to force access over HTTPS then copy the contents of the htaccess file attached to this article to top of the existing .htaccess file in the owncloud.local httpdocs directory.

This setup is appropriate for servers that have very few domains or do not regularly add/remove domains. 

 

OPTION 3 (best):

Save the vhost.conf and vhost_ssl.conf files attached to this article and upload to the conf directory of owncloud.local. If you want to force access over HTTPS then uncomment lines 4-6 in vhost.conf.  Then execute the following command as root to have Plesk pick up the new vhost files:

/usr/local/psa/admin/bin/httpdmng --reconfigure-domain owncloud.local

For any domains that do not have a wildcard entry in their DNS you will need to create an owncloud A type record.

Finally, remove the owncloud.yourdomain.com alias that you created in step 3.

This setup is appropriate for servers that have numerous domains or regularly add/remove domains.

 

 

 

vhost.conf
vhost.conf
vhost_ssl.conf
vhost_ssl.conf
htaccess
htaccess