0

Using Apache 2.2, I'd like to access an external server (reachable through the Internet) from one of my internal servers. The URLs will be rewritten to change the host so I'll either use mod_rewrite or mod_proxy, not sure yet which one is better for the task.

The problem is that to access the Internet with HTTP, we must use a proxy with authentication.

As I'm probably not very clear, here is a small diagram:

             -----      ---------      -----
clients ---> - A - ---> - proxy - ---> - B -
             -----      ---------      -----

A is the internal server, B is the external server.

I'd like URLs like http://A/fu/bar to be redirected to http://B/fu/bar , knowing there is a proxy requiring authentication in between.

I've tried using ProxyRemote using this syntax:

ProxyRemote * http://proxy.mynetwork.com:8080

It seems to go trough the proxy correctly: when I enter an URL http://A/fu/bar, I get the error "HTTP/1.1 407 proxy authentication required". I just don't know how I can specify the credentials for the proxy.

1

Looks like a no-go right now with stock Apache, but there's a half-decade-old proposed feature add (with a source patch) outstanding.

If you're feeling enterprising, it should be workable to get this ported to current Apache and recompiled.

  • Yes, I found this during my research but I don't feel that enterprising :-( . I've been looking for a pre-compiled patched Apache but no luck... – Snark Sep 4 '11 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.