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

50 lines
1.1 KiB
Nginx Configuration File
Raw Normal View History

location __PATH__/ {
2021-07-17 16:48:02 +02:00
alias __INSTALL_DIR__/;
2017-07-21 10:14:27 +02:00
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?pagename=$1;
}
2020-10-15 21:09:24 +02:00
#allow uploads up to 20MB in size
client_max_body_size 50M;
client_body_buffer_size 128k;
2018-01-18 23:29:59 +01:00
#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
location ~* \.php$ {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_index index.php;
include fastcgi_params;
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
}