Prestashop webservice keeps asking for authentication


We have created an EC2 instance with prestashop bitnami and we are having trouble activating the webservice.

when we put in browser key@site_url/api, authentication screen appears asking for user and password. We put the key as a user and password leave empty but keeps asking for authentication.

We’ve been doing a lot of testing but cant found the problem. ¿Do we have to configure anything on the server?

We add in .htaccess this code RewriteRule prueba.html [R] and dont redirect to ¿Is it enabled by default red_rewrite module ? ¿Is there any configuration that may be preventing redirection?

Any help would be appreciated

I forgot, we have version

it seems that we have detected the problem.

$_SERVER[‘PHP_AUTH_USER’] don’t works with php-fpm.

To solve, edit .htaccess and add just after

RewriteEngine on

the code:

RewriteCond %{HTTP:Authorization} ^(.)
RewriteRule ^(.

pd: if you have the file htaccess.conf on conf folder you must edit this file and add the code.

Hi @jose_f,

We are sorry for the delay in your answer and are really happy you could solve the issue on your own. Also, thanks for sharing your solution with the rest of our users. We’ll take this fix into consideration.

Best regards,

David Gonzalez

A better answer here might be adding

CGIPassAuth On

to the bottom of your .htaccess. This is explained here:

Basically the PHP default is not to pass authorisation headers through to the $_SERVER variable out of security concerns. Prestashop relies on those headers being present for API access and doesn’t work without it.

This is something the Bitnami developers could consider adding to improve the Prestashop experience. Hope that helps!