ownCloud nginx config

Mark Alan varia at e-healthexpert.org
Fri Jan 13 21:03:22 UTC 2012


In case anyone needs to setup ownCloud
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.



More information about the nginx mailing list