2018-06-17 00:50:26 +02:00
|
|
|
location ^~ __PATH__ {
|
2020-02-22 01:13:49 +01:00
|
|
|
alias __FINALPATH__/public;
|
2019-06-23 01:20:28 +02:00
|
|
|
|
2020-02-22 01:13:49 +01:00
|
|
|
index index.php;
|
2019-06-23 01:20:28 +02:00
|
|
|
|
|
|
|
# Force https
|
2018-06-17 00:50:26 +02:00
|
|
|
if ($scheme = http) {
|
|
|
|
rewrite ^ https://$server_name$request_uri? permanent;
|
|
|
|
}
|
2019-06-23 01:20:28 +02:00
|
|
|
|
|
|
|
try_files $uri $uri/ @firefly;
|
2020-02-22 01:13:49 +01:00
|
|
|
|
|
|
|
location ~* \.php(?:$|/) {
|
2018-06-17 00:50:26 +02:00
|
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
2020-02-22 01:13:49 +01:00
|
|
|
fastcgi_pass unix:/var/run/php7.3-fpm-__NAME__.sock;
|
|
|
|
fastcgi_param modHeadersAvailable true;
|
2018-06-17 00:50:26 +02:00
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param REMOTE_USER $remote_user;
|
|
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-17 06:32:42 +02:00
|
|
|
location @firefly {
|
2020-02-22 01:13:49 +01:00
|
|
|
rewrite /__PATH__/(.*)$ /__PATH__/index.php?/$1 last;
|
2018-06-17 06:32:42 +02:00
|
|
|
}
|