mirror of
https://github.com/YunoHost-Apps/pydio_ynh.git
synced 2024-09-03 20:16:05 +02:00
[enh] fix up nginx conf
This commit is contained in:
parent
ccd2d7d08f
commit
bc508761e9
1 changed files with 30 additions and 3 deletions
|
@ -1,11 +1,30 @@
|
||||||
location PATHTOCHANGE {
|
location PATHTOCHANGE {
|
||||||
alias ALIASTOCHANGE;
|
alias ALIASTOCHANGE/;
|
||||||
if ($scheme = http) {
|
if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
index index.php;
|
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$ {
|
location ~ \.php$ {
|
||||||
fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock;
|
fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
@ -13,6 +32,14 @@ location PATHTOCHANGE {
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
fastcgi_param REMOTE_USER $remote_user;
|
||||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
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) {
|
location ~* ^PATHTOCHANGE/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue