TestLinkのNginxの設定

server {
    listen       80;
    server_name  {server_name};

    root         /var/www/vhosts/testlink;

    location / {
        index index.php index.html index.htm;
    }

    location ~ (/logs/|/upload_area/|^/custom/|^/locale/|^/cfg/.*\.js|/\.) {
        deny all;
    }

    location ~ /lib/api/rest/v1/ {
        location ~ \.php$ {
            if (!-e $request_filename){
                rewrite ^(.*)$ / permanent;
            }
            fastcgi_pass   phpfpm;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
        if (!-e $request_filename){
            rewrite ^(.*)$ / permanent;
        }
    }

    location ~ \.php$ {
        fastcgi_pass   phpfpm;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

}