1

We're trying to setup Klaviyo on our Zandbox/test site with nginx.

But Klaviyo cant get the data from SOAP when i have htpasswd enabled. It needs to visit www.mytestdomain.com/api/v2_soap?wsdl=1 to get the data.

How can i disable auth_basic for the whole api folder? i already did this for some php files, but as this is not a specific php file i dont know. The code i use for php files is:

location =  /folder/file.php {
  auth_basic off;
  try_files $uri =404;
  expires off;
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  proxy_connect_timeout  2600s;
  proxy_send_timeout  2600s;
  proxy_read_timeout  2600s;
  fastcgi_send_timeout 2600s;
  fastcgi_read_timeout 2600s;
  fastcgi_pass zandbox;
  fastcgi_pass_request_headers on;
  fastcgi_keep_conn off;
  include fastcgi_params;
  fastcgi_param SCRIPT_FILENAME $document_root${fastcgi_script_name};
  fastcgi_param MAGE_RUN_CODE base;
  fastcgi_param MAGE_RUN_TYPE website;
  }

1 Answer 1

2

I believe you'd want location to look like this (as /api will tend to forward to /index.php/api from what I've seen in access logs, this rule should cover both)

location ~* ^/(index.php/)?api {

}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.