Print

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:

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