Skip to content

Commit

Permalink
Nginx virtual host config that seems to be working fine with Owncloud…
Browse files Browse the repository at this point in the history
… (together

with correct PHP configuration)

Signed-off-by: KheOps <[email protected]>
  • Loading branch information
kheops2713 committed Apr 23, 2015
1 parent 9998c6a commit 6868191
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions roles/common/templates/nginx-vhost.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ server {
try_files $uri $uri/ index.php;
client_max_body_size 2G;

#rewrite_log on;

rewrite ^/owncloud/caldav(.*)$ /owncloud/remote.php/caldav$1 redirect;
rewrite ^/owncloud/carddav(.*)$ /owncloud/remote.php/carddav$1 redirect;
rewrite ^/owncloud/webdav(.*)$ /owncloud/remote.php/webdav$1 redirect;
Expand All @@ -55,14 +57,14 @@ server {
deny all;
}

location ~ \.php(/|$) {
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;

fastcgi_pass unix:/var/run/php5-fpm.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_index index.php;
fastcgi_param PATH_INFO $path_info;
fastcgi_intercept_errors on;
include /etc/nginx/fastcgi_params;
}

location ~* \.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
Expand Down

0 comments on commit 6868191

Please sign in to comment.