Hi,
If you're running multiple instances of OwnCloud using Apache Virtual Hosts, this might interest you.
OwnCloud server packages like those found in CentOS, Debian, Ubuntu, etc. are usually built for a single instance of OwnCloud on a server, usually at the server's default DocumentRoot location. The owncloud-server.SlackBuild from SlackBuilds.org builds such a package, for a default /srv/httpd/htdocs/owncloud directory.
I've rewritten that SlackBuild so you can use it on multiple domains using Apache Virtual Hosts. Let's say you're hosting three different domains on your server:
- example1.com
- example2.org
- example3.net
If you want to use OwnCloud for each one of these domains, you can install it in three different locations. For example:
- /srv/httpd/vhosts/example1-owncloud/htdocs
- /srv/httpd/vhosts/example2-owncloud/htdocs
- /srv/httpd/vhosts/example3-owncloud/htdocs
Of course, you can always do it manually. But packaging OwnCloud is good for a few reasons, namely to clearly separate the application from the data (e. g. data and configuration is what is left when you remove the package), and to keep track of the installed version.
To keep track of my OwnCloud installations, I simply added the corresponding hostname to the package name. So on this particular server, I have three different OwnCloud packages:
- owncloud-server-example1.com-8.2.2-noarch-1_microlinux
- owncloud-server-example2.org-8.2.2-noarch-1_microlinux
- owncloud-server-example3.net-8.2.2-noarch-1_microlinux
Here's the owncloud-server.SlackBuild script that does it all:
http://www.microlinux.fr/microlinux/...ncloud-server/
Note: you can use that on 14.1 or -current too.
When building the package, you have to provide three variables interactively:
- your domain (example1.com)
- Your server root directory, something like /srv/httpd/htdocs or /srv/httpd/vhosts
- Your destination directory, something like example1-owncloud/htdocs
Last but not least, this script has stronger directory permissions than those defined in SBo's SlackBuild. I simply followed the permission directives given in the OwnCloud Server Documentation.
Cheers,
Niki
PS: here's a perfect example of why I prefer Slackware on a server. You don't have to jump through burning loops to do that.