Nginx kayako and PUT method

Discussion in 'Using the new Kayako' started by dim_s, Nov 23, 2016.

  1. dim_s

    dim_s Member

    Hi, everyone

    After migrate kayako to separate server with nginx + php-fpm our whmcs module was broken. The main issue is that the nginx doesn't support PUT method by default.

    WHMCS+Kayako support module and Kayako (4.75.1) are two dedicated servers.

    So I'll install nginx dav module, and add this into vhost config.

    Like that

    location /api/ {

    dav_methods PUT DELETE;
    dav_access user:rw group:rw all:r;
    create_full_put_path on;
    }

    But issue still exists.

    2016/11/23 20:25:59 [error] 32283#32283: *1340080 cannot PUT to a collection, client: 194.28.85.95, server: support.hostpro.ua, request: "PUT /api/?e=/Tickets/Ticket/2453237 HTTP/1.1", host: "support.hostpro.ua"

    2016/11/23 20:26:04 [error] 32281#32281: *1340091 cannot PUT to a collection, client: 194.28.85.95, server: support.hostpro.ua, request: "PUT /api/?e=/Tickets/Ticket/2453237 HTTP/1.1", host: "support.hostpro.ua"

    2016/11/23 20:26:08 [error] 32288#32288: *1340104 cannot PUT to a collection, client: 194.28.85.95, server: support.hostpro.ua, request: "PUT /api/?e=/Tickets/Ticket/2453237 HTTP/1.1", host: "support.hostpro.ua"

    2016/11/23 20:26:09 [error] 32281#32281: *1340111 cannot PUT to a collection, client: 194.28.85.95, server: support.hostpro.ua, request: "PUT /api/?e=/Tickets/Ticket/2453225 HTTP/1.1", host: "support.hostpro.ua"

    2016/11/23 20:27:09 [error] 32287#32287: *1340312 cannot PUT to a collection, client: 194.28.85.95, server: support.hostpro.ua, request: "PUT /api/?e=/Tickets/Ticket/2331042 HTTP/1.1", host: "support.hostpro.ua"

    May be someone have resolve this issue?
     
  2. dim_s

    dim_s Member

    I'll find right solution.

    So, if you use WHMCS and Kayako and NGINX you may use next location section in your site config

    location ~ ^/api/ {

    fastcgi_pass unix:/run/php/php5.6-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_script_name;
    fastcgi_intercept_errors on;

    include fastcgi_params;

    fastcgi_buffer_size 128k;
    fastcgi_buffers 256 16k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_read_timeout 240;


    dav_methods PUT DELETE;
    dav_access group:rw all:r;
    create_full_put_path on;


    }
     

Share This Page