I ran into a problem when Apache uses auth for the entire web site; which authenticates over LDAP.

However, I need to be able to run a certain process which creates an HTTP request to a web service URL from Unix command line, and is executed as a system user which is NOT in LDAP.

Is it possible to somehow configure Apache to pretend that a specific URL was authenticated when it wasn't? (I don't mean turn OFF authentication - I still need to have REMOTE_USER set to correct user).


1 Answer 1


What program are you using to generate the http request? You should have that program authenticate to Apache. curl, for example, supports HTTP Basic, HTTP digest, NTLM, and GSS-Negotiate.; e.g.

curl --basic --user username:password http://example.com/webservice
  • Apache is doing LDAP auth against LDAP database. And the user is NOT in LDAP>
    – Aye
    Mar 26, 2011 at 20:32
  • What do you mean by "the user"? The user that the process making the web service request runs as on Unix? That doesn't matter, as Apache never sees that. Just have your process send Apache a username and password that is valid for a user in LDAP. Or are you saying that the web service makes use of the CGI environment variable REMOTE_USER, which is set by the Apache authentication, but you want to be able to have Apache set REMOTE_USER to an arbitrary value without actually performing any authentication?
    – sciurus
    Mar 27, 2011 at 14:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .