diff --git a/conf/nginx.conf b/conf/nginx.conf index afc297b..c90211f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,11 +1,20 @@ -location ^~ __PATH__ { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location ^~ __PATH__/ { + + # Path to source alias __FINALPATH__/public/; - try_files $uri $uri/ @monica; - index index.php; - # Force https + + # Force usage of https if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } + + index index.php; + + # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file + #client_max_body_size 50M; + + try_files $uri $uri/ @monica; location ~ \.php { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;