diff --git a/conf/nginx.conf b/conf/nginx.conf index d9fdc4e..ccc052d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,20 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +if ($request_uri ~ "__PATH__/api(/[^\?]+)") { + set $path_info $1; +} + +location ~ __PATH__/api/(?:tickets|tasks|auth).*$ { + try_files $uri $uri/ /api/http.php?$query_string; +} + +if ($request_uri ~ "__PATH__/scp/.*\.php(/[^\?]+)") { + set $path_info $1; +} + +location ~ __PATH__/scp/ajax.php/.*$ { + try_files $uri $uri/ /scp/ajax.php?$query_string; +} + location __PATH__/ { # Path to source @@ -15,6 +31,8 @@ location __PATH__/ { fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; + set $path_info $fastcgi_path_info; + fastcgi_param PATH_INFO $path_info; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info;