blob: 359de3c9b217cc38fcb053fd2888c0a8d0e0f54f (
plain)
1 Android Client and Sync with OwnCloud on NGINX
2 ==============================================
3 :author: Aaron Ball
4 :email: nullspoon@iohq.net
5
6
7 == {doctitle}
8
9 I have been looking for a good way to move completely from Google for quite
10 some time. Many of the things I am dependant upon them for are pretty vital for
11 day to day operations. One of these is of course contact and calendar syncing.
12 Currently, my solution to that problem is http://www.egroupware.org[EGroupware]
13 for my server using syncml through http://funambol.com[Funambol] to synchronize
14 my contacts from my web server to my Android phone. This solution is bulky
15 taking about 80 MB on my server for the PHP code. Though this works, it is
16 hardly ideal. That's why I was so excited to try out
17 http://owncloud.org[ownCloud]. Their Android client is still definitely a work
18 in progress, but at least it's something (not to mention that they use
19 standards-based services, so several other sync apps for Android can work with
20 ownCloud).
21
22 Now, I run http://nginx.org[NGINX] on my web server which does things a little
23 differently than Apache, especially in regards to .htaccess files. Despite that
24 though, out of the box (or tarball) ownCloud seems to work perfectly. However,
25 when you try to sync up your Android phone via
26 http://owncloud.org/support/android/[their dandy client], you get this obscure
27 error
28
29 ----
30 Wrong path given
31 ----
32
33 Additionally, when you check your server access logs, you'll see
34
35 ----
36 Requested uri (/remote.php/webdav.php) is out of base uri (/remote.php/webdav/)
37 ----
38
39 This is most likely because you need two location directives in your NGINX conf
40 file (or vhost file if you're doing things that way). To fix this just put the
41 following two things in your said config file (This assumes your own cloud
42 server is running at
43
44 ----
45 location /owncloud {
46 index index.php;
47 try_files $uri $uri/ @owncloud
48 }
49 location @owncloud {
50 rewrite ^/owncloud/(.*)$ /owncloud.php/index.php?p=$1 last;
51 }
52 ----
53
54 And that should do it for you!
55
56
57 Category:Nginx
58 Category:Android
59
60
61 // vim: set syntax=asciidoc:
|