Created
August 2, 2013 03:15
-
-
Save Thermionix/6137261 to your computer and use it in GitHub Desktop.
nginx conf for owncloud 5.0 in subdir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /owncloud { | |
client_max_body_size 1024M; | |
location ~ ^/owncloud/(data|config|\.ht|db_structure\.xml|README) { | |
deny all; | |
} | |
rewrite ^/owncloud/.well-known/host-meta /public.php?service=host-meta last; | |
rewrite ^/owncloud/.well-known/host-meta.json /public.php?service=host-meta-json last; | |
rewrite ^/owncloud/.well-known/carddav /remote.php/carddav/ redirect; | |
rewrite ^/owncloud/.well-known/caldav /remote.php/caldav/ redirect; | |
rewrite ^/owncloud/apps/calendar/caldav.php /remote.php/caldav/ last; | |
rewrite ^/owncloud/apps/contacts/carddav.php /remote.php/carddav/ last; | |
rewrite ^/owncloud/apps/([^/]*)/(.*\.(css|php))$ /index.php?app=$1&getfile=$2 last; | |
rewrite ^(/owncloud/core/doc[^\/]+/)$ $1/index.html; | |
try_files $uri $uri/ index.php; | |
fastcgi_split_path_info ^/owncloud(.+\.php)(/.*)$; | |
location ~ ^(?<script_name>.+?\.php)(?<path_info>/.*)?$ { | |
try_files $script_name = 404; | |
include extra/fastcgi_params; | |
fastcgi_param PATH_INFO $path_info; | |
fastcgi_param HTTPS on; | |
fastcgi_pass unix:/var/run/php5-fpm.socket; | |
# fastcgi_param PHP_VALUE "upload_max_filesize = 1024M \n post_max_size = 1024M"; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment