Forum

Owncloud spits out an error message on every page

Owncloud error: file not found
25 May 2015, 21:02
Hey there,

I'm trying to migrate my apache2 installation to Hiawatha, things like wordpress already work.
But whenever I try to access my owncloud install, it shows an error page with: File not found.
I have created an alias for owncloud inside my virtualhost, and I think that might be the cause of the problem somehow.

Alias = /owncloud:/var/www/owncloud


My access.log spits out the following:
127.0.0.1|Mon 25 May 2015 20:38:01 +0200|404|285||GET /owncloud/index.php/apps/files HTTP/1.1|Host: www.domain.com|Connection: keep-alive|Cache-Control: max-age=0|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8|User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36|DNT: 1|Accept-Encoding: gzip, deflate, sdch|Accept-Language: nl,en;q=0.8,sv;q=0.6

Could someone shed some light on this problem, and why it is happening?
Hugo Leisink
25 May 2015, 21:05
Try adding this
EnablePathInfo = yes
Joost van Viegen
25 May 2015, 21:12
It wasn't enabled, but after enabling it I still have the same problem.

127.0.0.1|Mon 25 May 2015 21:10:34 +0200|404|285||GET /owncloud/index.php/apps/files/ HTTP/1.1|Host: www.domain.com|Connection: keep-alive|Cache-Control: max-age=0|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8|User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36|DNT: 1|Accept-Encoding: gzip, deflate, sdch|Accept-Language: nl,en;q=0.8,sv;q=0.6
Joost van Viegen
25 May 2015, 21:25
The rest of the virtualhost is this:
Virtualhost {
Hostname = www.domain.com, domain.com
WebsiteRoot = /var/www/sitedir
UseToolkit = wordpress, wp-multi-subdir
TimeForCGI = 86400
UseFastCGI = PHP5
SSLcertFile = /etc/ssl/domain.com/serverkey.pem
ExecuteCGI = yes
StartFile = index.html
Alias = /owncloud:/var/www/owncloud
WebDAVapp = yes
EnablePathInfo = yes
}
Joost van Viegen
25 May 2015, 21:42
I also have an .hiawatha file inside /var/www/owncloud, it looks like this:
Setenv HOME = /var/www/owncloud
Setenv HTTP_HOME = /var/www/owncloud
AllowDotFiles = yes
UseToolkit = dataDeny


The toolkit dataDeny is in the hiawatha.conf file

UrlToolkit {
ToolkitID = denyData
Match ^/data DenyAccess
}
Hugo Leisink
25 May 2015, 21:51
Does it work when you use a symlink on disk instead of the Alias configuration setting?
Joost van Viegen
26 May 2015, 05:18
I tried the following command
 sudo ln -s /var/www/owncloud/ /var/www/sitefolder/owncloud 
with and without the last forward slash behind the first one. And when I now try to access the page. , after commenting Alias, and of course adding a FollowSymlinks = yes.
Hiawatha now spits out an internal server error when using /owncloud:
127.0.0.1|Tue 26 May 2015 05:13:28 +0200|500|881||GET /owncloud/ HTTP/1.1|Host: www.domain.com|Connection: keep-alive|Cache-Control: max-age=0|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8|User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36|DNT: 1|Accept-Encoding: gzip, deflate, sdch|Accept-Language: nl,en;q=0.8,sv;q=0.6

and again a file not found error when using /owncloud/index.php/apps/files/
127.0.0.1|Tue 26 May 2015 05:14:08 +0200|404|285||GET /owncloud/index.php/apps/files/ HTTP/1.1|Host: www.domain.com|Connection: keep-alive|Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8|User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36|DNT: 1|Accept-Encoding: gzip, deflate, sdch|Accept-Language: nl,en;q=0.8,sv;q=0.6
Joost van Viegen
26 May 2015, 17:47
I just discovered that php5-fpm is looking for the index.php file in /var/www/sitedir/ instead of where my alias is pointing.
So I tried to symlink /var/www/owncloud/index.php to /var/www/sitedir/index.php. Which kinda worked. Altough it only loads the php. The css and images are still not shown. And logging in is also not possible.

Ideas?
Hugo Leisink
27 May 2015, 08:45
My advice is to first make it work for within a hostname (so you'll what ownCloud needs), then move it to a subdirectory and make it work, and finally replace the subdirectory with a symlink or something like it.
This topic has been closed.