diff --git a/conf/nginx.conf b/conf/nginx.conf index 556b622..c207bfc 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/ ; + alias __FINALPATH__/app/webroot/ ; # Force usage of https if ($scheme = http) { @@ -11,14 +11,14 @@ location __PATH__/ { 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/ __PATH__/__PATH__/index.php?$query_string; - try_files $uri $uri/ index.php; - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; + location ~ \.php$ { + if (!-e $request_filename) { + rewrite ^__PATH__/?(.*)$ __PATH__/index.php?/$1 last; + break; + } fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; - fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user;