pydio_ynh/conf/nginx.conf
Guillaume Roche 5a43074f2f Update nginx.conf
Add client_max_body_size in nginx.conf for upload files
2015-02-25 20:59:26 +01:00

51 lines
1.9 KiB
Nginx Configuration File

location PATHTOCHANGE {
alias ALIASTOCHANGE/;
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
client_max_body_size 10G;
index index.php;
rewrite ^PATHTOCHANGE/dashboard|^PATHTOCHANGE/settings|^PATHTOCHANGE/welcome|^PATHTOCHANGE/ws- PATHTOCHANGE/index.php last;
if ( !-e $request_filename ) {
# WebDAV Rewrites
rewrite ^PATHTOCHANGE/shares PATHTOCHANGE/dav.php last;
# Sync client
rewrite ^PATHTOCHANGE/api PATHTOCHANGE/rest.php last;
# External users
rewrite ^PATHTOCHANGE/user PATHTOCHANGE/index.php?get_action=user_access_point last;
# Public shares
rewrite ^PATHTOCHANGE/data/public/([a-zA-Z0-9_-]+)\.php$ PATHTOCHANGE/data/public/share.php?hash=$1?;
}
rewrite ^PATHTOCHANGE/data/public/([a-zA-Z0-9_-]+)--([a-z]+)$ PATHTOCHANGE/data/public/share.php?hash=$1&lang=$2?;
rewrite ^PATHTOCHANGE/data/public/([a-zA-Z0-9_-]+)$ PATHTOCHANGE/data/public/share.php?hash=$1?;
# Prevent Clickjacking
add_header X-Frame-Options "SAMEORIGIN";
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
# Enables Caching
location ~* \.(ico|css|js)$ {
expires 7d;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
}
location ~* ^PATHTOCHANGE/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
deny all;
}
location ~* PATHTOCHANGE/data/public/.*.(ser|htaccess)$ {
deny all;
}