Jump to content

Apache as a Proxy


robinwatts

Recommended Posts

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 of my choosing.

 

In the full thing, this will be the website 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.wss.co.uk/) to test this with.

 

I'd hoped to be able to do:

 

<Proxy http://www.wss.co.uk/*>

  Order allow,deny

  Allow from all

</Proxy>

 

But accesses to http://www.wss.co.uk/ still tell me they need authorisation.

 

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

 

Thanks,

 

Robin

 

Link to comment
https://forums.phpfreaks.com/topic/55114-apache-as-a-proxy/
Share on other sites

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.wss.co.uk/ 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

 

Link to comment
https://forums.phpfreaks.com/topic/55114-apache-as-a-proxy/#findComment-273570
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.