HTH for all trying to get this working
My server is
Apache2.2
The first error I got was
Code: Select all
/mantisbt/api/rest/issues was not found 404
To resolve this, I changed the conf.d/mantisbt.conf from
to
Once I changed that, I got an
Error 500. Looking in the log, I saw
Code: Select all
configuration error: couldn't perform authentication. AuthType not set!: /mantisbt/api/rest/issues
That was because I had a configuration item
In my mantisbt.conf. This command isn't valid in apache2.2, only 2.4. My final mantisbt.conf file looks like this, very simple
Code: Select all
Alias /mantisbt "/home/mantisbt/mantisbt"
<Directory "/home/mantisbt/mantisbt">
AllowOverride All
</Directory>
The next problem was when I tried to issue a request against the API. I got an error:
Code: Select all
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /home/mantisbt/mantisbt-2.22.1/api/rest/index.php was not found on this server.</p>
<hr>
Note that although the rewrite rule is finding index.php, I'ts looking in the wrong directory. The problem is caused because mantis
isn't installed under /var/www/html. To fix it, I simply hardcoded the full path to index.php in the rule.
Here is my .htaccess file in /mantisbt/api/rest
Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /mantisbt/api/rest/index.php [QSA,L]
I can now issue rest requests against mantis