mirror of
https://github.com/YunoHost-Apps/friendica_ynh.git
synced 2024-09-03 18:36:14 +02:00
commit
2871df65a6
1 changed files with 64 additions and 58 deletions
|
@ -31,7 +31,9 @@
|
||||||
location __PATH__ {
|
location __PATH__ {
|
||||||
alias __FINALPATH__/;
|
alias __FINALPATH__/;
|
||||||
|
|
||||||
|
if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
|
}
|
||||||
|
|
||||||
#allow uploads up to 20MB in size
|
#allow uploads up to 20MB in size
|
||||||
client_max_body_size 20m;
|
client_max_body_size 20m;
|
||||||
|
@ -58,7 +60,7 @@ rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
# by denying dot files and rewrite request to the front controller
|
# by denying dot files and rewrite request to the front controller
|
||||||
location ^~ /.well-known/ {
|
location ^~ /.well-known/ {
|
||||||
allow all;
|
allow all;
|
||||||
rewrite ^/(.*) /index.php?pagename=$uri&$args last;
|
rewrite ^/(.*) /index.php?pagename=$request_uri&$args last;
|
||||||
}
|
}
|
||||||
|
|
||||||
#statically serve these file types when possible
|
#statically serve these file types when possible
|
||||||
|
@ -67,7 +69,7 @@ rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
#added .htm for advanced source code editor library
|
#added .htm for advanced source code editor library
|
||||||
location ~* \.(jpg|jpeg|gif|png|ico|css|js|htm|html|ttf|woff|svg)$ {
|
location ~* \.(jpg|jpeg|gif|png|ico|css|js|htm|html|ttf|woff|svg)$ {
|
||||||
expires 30d;
|
expires 30d;
|
||||||
try_files $uri /index.php?pagename=$uri&$args;
|
try_files $uri /index.php?pagename=$request_uri&$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
#block these file types
|
#block these file types
|
||||||
|
@ -87,10 +89,14 @@ rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#.htaccess file from Friendica converted using http://winginx.com/en/htaccess
|
#.htaccess file from Friendica converted using http://winginx.com/en/htaccess
|
||||||
location ~ "(^|/)\.git" { return 403;}
|
location ~ "(^|/)\.git" {
|
||||||
autoindex off;
|
return 403;
|
||||||
location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?pagename=$1;}
|
|
||||||
}
|
}
|
||||||
|
autoindex off;
|
||||||
|
if (!-e $request_filename) {
|
||||||
|
rewrite ^(.*)$ /index.php?pagename=$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#deny access to all dot files
|
#deny access to all dot files
|
||||||
location ~ /\. {
|
location ~ /\. {
|
||||||
|
|
Loading…
Reference in a new issue