1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my_webapp_ynh.git synced 2024-09-03 19:46:26 +02:00
my_webapp_ynh/conf/nginx.conf

47 lines
1.3 KiB
Nginx Configuration File

location LOCATIONTOCHANGE {
alias ALIASTOCHANGEfiles/;
index index.php index.html index.htm;
default_type text/html;
client_max_body_size 1G;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
# Admin location - DO NOT EDIT
location PATHTOCHANGE/admin/_assets {
alias /var/www/my_webapp/_assets/;
}
location PATHTOCHANGE/admin {
alias /var/www/my_webapp/;
client_max_body_size 10G;
location ~ ^PATHTOCHANGE/admin$ {
rewrite ^(.*) $1/ redirect;
}
location ~ ^PATHTOCHANGE/admin/ {
fastcgi_split_path_info ^(PATHTOCHANGE/admin)(/?.*)$;
fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME ALIASTOCHANGEadmin.php;
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}