I've been trying to get the rewriting correct on a server with nginx. Mantisbt is in a subdirectory /dev/. Has anyone gotten the api to work on nginx?
Thanks!
API 404 on Nginx
Moderators: Developer, Contributor
Re: API 404 on Nginx
Here point is that API requests go to URI like this ....api/soap/mantisconnect.php/mc_issue_get
And I think nginx is configured to use PHP-FPM with usual directive
"/var/www/mantis/api/soap/mantisconnect.php/mc_issue_get" failed (20: Not a directory)
To solve this I've created additional location with same content as location for PHP-files:
And I think nginx is configured to use PHP-FPM with usual directive
So, API requests do not go to PHP-FPM but nginx tries to process them as usual files and nginx have this kind of errors in errorloglocation ~ \.php$ {
...
}
"/var/www/mantis/api/soap/mantisconnect.php/mc_issue_get" failed (20: Not a directory)
To solve this I've created additional location with same content as location for PHP-files:
This location block also can be used for security by limiting access to it by IP address for example.location /api/soap {
...
}