使用身份validation设置Apache代理

我需要使用身份validation设置代理来validation连接到Internet的应用程序的行为。

我正在尝试使用转发代理和身份validation来设置Apache安装,即使我已经接近使其工作,但是我想知道是否有更好的方法,因为configuration相当深奥。

Apache如何configuration成这样工作?

有没有其他的configuration好的选项? 也许一些虚拟机或其他软件工具,而不是Apache?

为了logging,这是我如何设置Apache作为基本authentication的转发代理:

打开http.conf

取消注释以下LoadModule指令以启用代理function

LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so 

将以下指令添加到http.conf以启用身份validation

 ProxyRequests On ProxyVia On <Proxy *> Order deny,allow Allow from all AuthType Basic AuthName "Password Required" AuthUserFile password.file AuthGroupFile group.file Require group usergroup </Proxy> 

使用htpasswd.exe实用程序创build一个password.file。 将其放置在Apache根目录下

 htpasswd.exe -c password.file username 

使用与password.file同级的文本编辑器创build一个group.file,其中包含以下内容

 usergroup: username 

然后运行apachectl restart来获取configuration更改。

我用鱿鱼 。

使用configuration文件中的“auth_param”指令进行基本身份validation可以很容易地进行安装。

你会find一些样本 , 了解它是如何工作的 ,以及有关Squid网站上的auth_param的所有细节