2018-03-13 21:49:11 +01:00
|
|
|
{% if path_url != "/" %}
|
|
|
|
rewrite ^{{ path_url }}$ {{ path_url }}/ permanent;
|
2018-03-14 01:45:08 +01:00
|
|
|
{% else %}
|
|
|
|
{% set path_url = "" %}
|
2018-03-13 21:49:11 +01:00
|
|
|
{% endif %}
|
|
|
|
location {{ path_url }}/ {
|
|
|
|
alias {{ final_path }}/;
|
2017-02-02 03:37:01 +01:00
|
|
|
index index.php;
|
|
|
|
# if (!-e $request_filename)
|
|
|
|
#{
|
2018-03-13 21:49:11 +01:00
|
|
|
# rewrite ^(.+)$ {{ path_url }}/index.php?q=$1 last;
|
2017-02-02 03:37:01 +01:00
|
|
|
#}
|
|
|
|
if ($scheme = http) {
|
|
|
|
rewrite ^ https://$server_name$request_uri? permanent;
|
|
|
|
}
|
|
|
|
client_max_body_size 30m;
|
|
|
|
location ~ [^/]\.php(/|$) {
|
|
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
|
|
fastcgi_pass unix:/var/run/php5-fpm-{{ app }}.sock;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param REMOTE_USER $remote_user;
|
|
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
|
|
fastcgi_param HTTPS on;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Include SSOWAT user panel.
|
|
|
|
include conf.d/yunohost_panel.conf.inc;
|
|
|
|
}
|
|
|
|
|
2018-03-13 21:49:11 +01:00
|
|
|
location ~ ^{{ path_url }}(data|config|\.ht|db_structure\.xml|README) {
|
2017-02-02 03:37:01 +01:00
|
|
|
deny all;
|
|
|
|
}
|