1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00
friendica_ynh/conf/nginx.conf

51 lines
1.2 KiB
Nginx Configuration File
Raw Normal View History

#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
2021-07-17 16:48:02 +02:00
2023-08-20 15:36:10 +02:00
alias __INSTALL_DIR__/;
2017-07-21 10:14:27 +02:00
2021-07-19 10:03:23 +02:00
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?pagename=$1;
}
2020-10-15 21:09:24 +02:00
2018-01-18 23:29:59 +01:00
#allow uploads up to 20MB in size
2023-08-20 15:51:37 +02:00
client_max_body_size 50M;
2018-01-18 23:29:59 +01:00
client_body_buffer_size 128k;
#Default indexes and catch-all
index index.php;
2020-10-15 21:09:24 +02:00
# make sure webfinger and other well known services aren't blocked
# by denying dot files and rewrite request to the front controller
location ^~ /.well-known/ {
allow all;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?pagename=$1;
}
}
2020-10-15 21:09:24 +02:00
include mime.types;
2018-01-18 23:29:59 +01:00
# block these file types
location ~* \.(tpl|md|tgz|log|out)$ {
deny all;
}
2018-01-18 23:29:59 +01:00
#Execute and serve PHP files
2018-06-21 18:31:15 +02:00
location ~* \.php$ {
2018-01-18 23:29:59 +01:00
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
2018-06-21 18:31:15 +02:00
try_files $uri =404;
2020-10-15 21:09:24 +02:00
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
2018-01-18 23:29:59 +01:00
fastcgi_index index.php;
include fastcgi_params;
2018-06-21 18:31:15 +02:00
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2018-01-18 23:29:59 +01:00
}
# deny access to all dot files
location ~ /\. {
deny all;
}
2023-08-21 11:53:28 +02:00
#Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
2018-01-18 23:29:59 +01:00
}