With the goal to install owncloud (version 6.0.3-0) on my ubuntu server (14.04), I followed this guideline: http://doc.owncloud.org/server/6.0/admin_manual/installation/installation_source.html
After having this completed, the /var/www/owncloud folder exists with the following content:
3rdparty core index.html occ robots.txt themes apps cron.php index.php ocs search version.php config data l10n public.php settings console.php db_structure.xml lib remote.php status.php
Visiting
http://localhost
results in a site like this: https://assets.digitalocean.com/articles/lamp_1404/default_apache.png indicating, that the apache-server works.
Visiting
http://localhost/owncloud
leads to server error 404: "Not Found".
Meanwhile, I tried the installation (owncloud 6.0.3-0) on my laptop (Ubuntu 13.10) to compare results. Skipping the above guidelines, just installing owncloud using the package-manager works out of the box, while the content of /var/www/owncloud results only in config data
Since it works on my laptop, I have the suspect, that I screwed up some configuration on my ubuntu server. Even so, reinstalling apache2 (including purge) did not help.
Do you have any ideas, where to start over?
This is because Apache 2.4's default web root is /var/www/html as opposed to /var/www. ownCloud's default installation ends up in /var/www/owncloud, which is outside of the web root.
I first solved this by creating a symbolic link at /var/www/html/owncloud, but I found it cleaner to simply change Apache's document root to /var/www/owncloud. If you want to preserve the owncloud subdirectory, you can point it to /var/www and get rid of /var/www/html and its contents.
Edit /etc/apache2/sites-enabled/000-default.conf (and/or the appropriate configuration for the SSL site in the same location, depending on your setup) to point DocumentRoot to /var/www or /var/www/owncloud, whichever works for you.
I just figured this out myself, so it may warrant further configuration changes. I will update this post if/when I figure out more tweaks need to be made, but it seems to be working for me, anyway.
Also this has nothing to do with programming and really belongs on superuser.com or perhaps serverfault.com.