Forum Moderators: phranque

Message Too Old, No Replies

Proxy problems

Forward Caching Proxy with selective authentication - how?

         

robinwatts

10:21 am on Jun 12, 2007 (gmt 0)

10+ Year Member



Hi all,

I've got Apache running as a forward proxy on an intranet. This is a prototype for a machine that will be live on the internet, and so I need to add authorisation to it, so I'm not an open proxy.

I've therefore added the following lines to my httpd.conf:

<Proxy *>
AuthType Digest
AuthName "Picsel Proxy"
AuthDigestDomain *
AuthDigestProvider file
AuthUserFile /home/robin/apache/install/conf/auth_digest
Require valid-user
</Proxy>

This is all working swimmingly.

The next thing I'd like to do though is to be able to allow *unauthorised* access to a website (or websites) of my choosing.

In the full thing, this will be the website(s) you need to connect to in order to get a username/password to be able to use the proxy for the web at large. For now, I'm using my own website (http://www.example.com/) to test this with.

I'd hoped to be able to do:

<Proxy http://www.example.com/*>
Order allow,deny
Allow from all
</Proxy>

But accesses to http://www.example.com/ still tell me they need authorisation.

Can anyone tell me what I'm doing wrong please?

Thanks,

Robin

[edited by: jdMorgan at 1:42 am (utc) on June 13, 2007]
[edit reason] examplified [/edit]

jdMorgan

3:14 pm on Jun 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Where is the documentation for this <Proxy> container you're using? I don't see that in the Apache documentation, only <Directory> containers and the like...

Jim

robinwatts

4:20 pm on Jun 12, 2007 (gmt 0)

10+ Year Member



<Proxy> is what the Apache 2.2 docs tell me to use...

[httpd.apache.org...]

for instance.

If you have a solution that uses <Directory> instead, I'll gladly try that. I thought (based on googling and testing) that:

<Directory proxy:...>

was an old way of working - but I could easily be wrong.

Thanks,

Robin

jdMorgan

8:54 pm on Jun 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I haven't set up an Apache 2.x Proxy, so that's why I asked... :)

If you don't have any luck after researching this problem and experimenting, I'll try to find some time to read the newer version docs. Until then, I can't contribute much of any use.

Jim

robinwatts

12:03 am on Jun 13, 2007 (gmt 0)

10+ Year Member



I have researched, and experimented and read the docs :(

But hopefully I've just missed something obvious. Any help you can offer would be much appreciated.

Thanks for your time,

Robin

robinwatts

12:09 am on Jun 13, 2007 (gmt 0)

10+ Year Member



I've just had the solution given to me on another forum.

Apparently I need a 'Satisfy Any' line in the second proxy block.

Attempting to fetch from http://www.example.com/ matches both blocks, and so by default requires both to be satisfied to work. Telling it to accept either one solves the problem nicely.

Obvious once someone points it out :)

Thanks,

Robin

[edited by: jdMorgan at 1:43 am (utc) on June 13, 2007]
[edit reason] example.com [/edit]