How to configure Apache2+fcid for Basic Auth / REST API
Added by Jürgen Hörmann over 14 years ago
Hello,
I have Redmine 1.0.1 set up via Apache2 and mod_fcgid on a Debian 5 system.
Everything is working well but I cannot call the RESTful API. I always get an 401 Authorisation required response.
Do you know how to configure Apache to pass through the Authorisation headers to Redmine? I already tried some Rewrite rules from the net like:
RewriteRule ^(.*)$ dispatch.fcgi [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]
and the configuration option
PASSHEADER AUTHORIZATION
Until now I did not manage to get this working. I'd be grateful for some advice.
Replies (4)
RE: How to configure Apache2+fcid for Basic Auth / REST API - Added by Jürgen Hörmann over 14 years ago
I found a solution for my problem.
You need a little different rewrite rule to get it working:
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]
I found this on an good blogpost you might want to read:
How to set up Pentabarf Conferencing System with Apache and FCGID on Ubuntu
RE: How to configure Apache2+fcid for Basic Auth / REST API - Added by Bruno Medeiros over 13 years ago
I changed it on Redmine's public/.htaccess
file and authentication is working perfectly now. Is there any issue open for that?
RE: How to configure Apache2+fcid for Basic Auth / REST API - Added by Jürgen Hörmann over 13 years ago
Hi Bruno.
No I did not open a issue for this. Maybe you want to add a note for this somewhere in the documentation.