Dolibarr version : 10.0.3 - api documentation : https://wiki.dolibarr.org/index.php/Module_Web_Services_API_REST_(developer). I can't find anything about the configuration of nginx in the dolibarr documentation. But it seems to be a nginx configuration problem.
The part of the nginx configuration with locations :
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
I tested everything I found without success as add:
#test 1
rewrite ^/api/index.php/explorer(.*)$ /api/index.php last;
#test 2
location /api {
if ( !-e $request_filename) {
rewrite ^.* /api/index.php last;
}
}
#test 3
location ~ ^/api/(?!(index\.php))(.*) {
try_files $uri /api/index.php/$2?$query_string;
}
With the first 2 solutions the API api/index.php/explore responds but I don't have access to the login:
I should have this:
This work well : https://wiki.dolibarr.org/index.php/Module_Web_Services_API_REST_(developer)#Nginx_setup