You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by 朱彥如 <yj...@cht.com.tw> on 2004/12/03 07:17:32 UTC

[users@httpd] Fw: How can apache act as both proxy server and client?

Hi:
    I have set up a Apache server (version 1.3.33-2) in Intranet to act as a proxy server, with following commands in httpd.conf:

 ******************************************************
    LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so

    ProxyPass /hinet http://www.hinet.net/
    ProxyPassReverse /hinet http://www.hinet.net/
****************************************************** 

However, when this apache proxy server acceesses http://www.hinet.net/ (which is in the Internet), it must pass through another proxy server (between Intranet and Internet) with authententication. 

That is, my Apache server acts as both proxy server and proxy client. (I have special purpose for this setting)

How can I specify the second proxy server in my Apache proxy server ? In addition to specificy the proxy server, I must also give the username/password to the second proxy server for authentication. 

Regards

Yann-Ju Chu
朱彥如 (Big5)
ChungHwa Telecom. Co.

Re: [users@httpd] Apache 2.0.52 SSI include of Mod_Rewrite proxied page

Posted by Duncan Brannen <db...@st-andrews.ac.uk>.
PS.

ProxyPass /news/        http://server2/news/

works

At 13:11 03/12/2004, you wrote:

>Hi All,
>         In Apache 1.3  I could have a .shtml page that did
>
>eg.
>
><!--#include virtual="/news/headlines.html" -->
>
>and a rewite rule on the server
>
>RewriteRule ^/news/(.*)$ http://server2/news/$1 [proxy]
>
>Which would include the file headlines.html from server2.
>
>In Apache2, the server looks for the file locally, ignoring the
>ReWrite rule and giving an error, though manually loading
>
>http://server1/news/headlines.html  correctly shows the page
>from server2.
>
>
>Is there a way to make Apache2 behave as Apache 1.3 did or do
>I have to roll back to Apache 1.3 again?
>
>
>Cheers,
>         Duncan
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.0.52 SSI include of Mod_Rewrite proxied page

Posted by Nick Kew <ni...@webthing.com>.
On Fri, 3 Dec 2004, Duncan Brannen wrote:

>
> <!--#include virtual="/news/headlines.html" -->
>
> and a rewite rule on the server
>
> RewriteRule ^/news/(.*)$ http://server2/news/$1 [proxy]

As an alternative to that, you could use
<!--#include url="http://server2/news/headlines.html"-->

Currently supported in mod_publisher from http://apache.webthing.com/

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Apache 2.0.52 SSI include of Mod_Rewrite proxied page

Posted by Duncan Brannen <db...@st-andrews.ac.uk>.
Hi All,
	In Apache 1.3  I could have a .shtml page that did

eg.

<!--#include virtual="/news/headlines.html" -->

and a rewite rule on the server

RewriteRule ^/news/(.*)$ http://server2/news/$1 [proxy]

Which would include the file headlines.html from server2.

In Apache2, the server looks for the file locally, ignoring the
ReWrite rule and giving an error, though manually loading

http://server1/news/headlines.html  correctly shows the page
from server2.


Is there a way to make Apache2 behave as Apache 1.3 did or do
I have to roll back to Apache 1.3 again?


Cheers,
	Duncan


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Fw: How can apache act as both proxy server and client?

Posted by Joshua Slive <js...@gmail.com>.
On Fri, 3 Dec 2004 14:17:32 +0800, 朱彥如 <yj...@cht.com.tw> wrote:
>  
> Hi: 
>     I have set up a Apache server (version 1.3.33-2) in 
> Intranet to act as a proxy server, with following commands in httpd.conf: 
>   
>  ****************************************************** 
>     LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so 
>   
>     ProxyPass /hinet http://www.hinet.net/ 
>     ProxyPassReverse /hinet http://www.hinet.net/ 
> ******************************************************  
>   
> However, when this apache proxy server acceesses http://www.hinet.net/
> (which is in the 
> Internet), it must pass through another proxy server (between Intranet and
> Internet) with authententication. 
>   
> That is, my Apache server acts as both proxy server and proxy client. (I
> have special purpose for this setting) 
>   
> How can I specify the second proxy server in my Apache proxy server ? In
> addition to specificy the proxy server, I must also give the
> username/password to the second proxy server for authentication. 

See the ProxyRemove directive:
http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxyremote

But I don't believe this will handle authenticated access to proxies. 
I know of no way to do that.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org