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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.