# ownCloud nginx config

**URL:** <https://www.ruby-forum.com/t/owncloud-nginx-config/215735>\
**Category:** NGINX\
**Created:** [January 13, 2012, 10:04pm UTC](https://www.ruby-forum.com/t/owncloud-nginx-config/215735 "2012-01-13T22:04:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 13, 2012, 10:04pm UTC](https://www.ruby-forum.com/t/owncloud-nginx-config/215735/1 "2012-01-13T22:04:08Z")

</div>

In case anyone needs to setup ownCloud  
[http://owncloud.org/](http://owncloud.org/) (it is a web-based personal cloud),  
using Debian 6 / Ubuntu 11.10 and Nginx 1.1.12,

here is the config file provided by the ownCloud team:

# nginx - /etc/nginx/sites-available/owncloud

# nginx must be compiled using --with-http\_dav\_module,

server {  
listen 80;  
keepalive\_timeout 70;  
server\_name cloud.localhost;  
root /var/www/owncloud;  
client\_max\_body\_size 8M;

# 

dav\_methods PUT DELETE MKCOL COPY MOVE;  
create\_full\_put\_path on;  
dav\_access user:rw group:rw all:r;

# 

location / {  
index index.html index.htm index.php;  
}  
location ~ .php$ {  
include /etc/nginx/fastcgi\_params;  
fastcgi\_pass unix:/tmp/php-fpm.socket;  
fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME  
$document\_root$fastcgi\_script\_name; }  
location /owncloud {  
index index.php;  
try\_files $uri $uri/ @webdav;  
}  
location @webdav {  
fastcgi\_split\_path\_info ^(.+.php)(/.+)$;  
fastcgi\_param SCRIPT\_FILENAME  
$document\_root$fastcgi\_script\_name; include fastcgi\_params;  
fastcgi\_pass unix:/tmp/php-fpm.socket;  
}  
}

# — ends here —

M.

---

<div class="post-metadata">

**Author:** ![larios](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/bc79bd/32.png) [@larios](https://www.ruby-forum.com/u/larios)\
**Post date:** [January 14, 2012, 2:35am UTC](https://www.ruby-forum.com/t/owncloud-nginx-config/215735/2 "2012-01-14T02:35:22Z")

</div>

It would be more helpful if you documented these on the wiki:

> **[Getting Started | NGINX](https://www.nginx.com/resources/wiki/start/)**
>
> Useful tools, examples, and other learning resources for getting started with NGINX.

Regards,  
Clif
