Skip to content

Instantly share code, notes, and snippets.

@wizardfrag
Created September 24, 2013 21:29
Show Gist options
  • Save wizardfrag/6691524 to your computer and use it in GitHub Desktop.
Save wizardfrag/6691524 to your computer and use it in GitHub Desktop.
Owncloud config
server {
root /srv/owncloud;
index index.html index.htm index.php;
server_name xxxxx;
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
client_max_body_size 10000M;
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}
location ~ ^(.+?\.php)(/.*)?$ {
try_files $1 = 404;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php-fpm.sock;
include fastcgi_params;
}
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
access_log off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment