Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Owncloud not available after installation on Ubuntu server 14.04

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?

like image 858
user258346 Avatar asked Dec 12 '22 05:12

user258346


2 Answers

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.

like image 99
Matteo C Avatar answered Dec 13 '22 17:12

Matteo C


This would be more appropriate as a comment as I'm completely clueless as to the solution, but the strange system of SO doesn't allow me to post comments. I have an idea that may not help but just want to confirm that it's not the problem.

Have you tried the following URL?

http://localhost/owncloud/index.html

The first thing that came to mind is that there is a problem with your Default Document settings.

If the above works, you can fix it so you don't have to define the HTML file in the URL by creating a .htaccess file in your server root directory with the contents being:

DirectoryIndex  index.php index.html index.htm default.html default.htm home.html

Hope this helps.

like image 40
Gilgamesh Avatar answered Dec 13 '22 18:12

Gilgamesh