my_idlers_ynh/conf/nginx.conf

31 lines
915 B
Nginx Configuration File

location / {
alias __INSTALL_DIR__/public/;
# try redirecting stuff to index.php
rewrite ^(.*)$ /index.php$1 last;
index index.php;
client_max_body_size 256M;
#Laravel: append $query_string
try_files $uri $uri/ /index.php?$query_string;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock;
fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass_header Authorization;
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
# not tested; it may have trouble redirecting
location /api/ {
alias __INSTALL_DIR__/public/;
try_files $uri $uri/ /api/index.php?$query_string;
}