Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Apache as proxy for the web

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  log rotation weekly (for Windows)  
Author Message
marknospam

External


Since: Jul 21, 2003
Posts: 1



(Msg. 1) Posted: Mon Jul 21, 2003 9:28 am
Post subject: Apache as proxy for the web
Archived from groups: alt>apache>configuration (more info?)

Hi all,
I need to config Apache so that every request that is coming
is redirected to the www. I'd like in other words to use it as a proxy
for Internet. Is it possible ?
I've read about the proxy directive, but I cannot find a way to forward
a route to the web....
any help ?
Thanks a lot
Francesco

 >> Stay informed about: Apache as proxy for the web 
Back to top
Login to vote
user2357

External


Since: Jul 02, 2003
Posts: 37



(Msg. 2) Posted: Mon Jul 21, 2003 10:05 am
Post subject: Re: Apache as proxy for the web [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You just enable the mod_proxy mod_proxy_connect mod_proxy_ftp and
mod_proxy_http then:

<IfModule mod_proxy.c>
ProxyRequests On

<Proxy *>
Order deny,allow
Deny from all
Allow from 192.168.1 127.0.0.1 localhost
</Proxy>

Make sure you have the deny from all in place and add your network data in
the allow from part.

But Apache isn't a router, so you will have to enable all the clients to use
that machine as a proxy.

Rach

"Francesco M." <markNoSpam.TakeThisOut@libero.it> wrote in message
news:DKLSa.191101$lK4.5457219@twister1.libero.it...
 > Hi all,
 > I need to config Apache so that every request that is coming
 > is redirected to the <a style='text-decoration: underline;' href="http://www." target="_blank">www.</a> I'd like in other words to use it as a proxy
 > for Internet. Is it possible ?
 > I've read about the proxy directive, but I cannot find a way to forward
 > a route to the web....
 > any help ?
 > Thanks a lot
 > Francesco
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Apache as proxy for the web 
Back to top
Login to vote
superfc

External


Since: Jul 21, 2003
Posts: 7



(Msg. 3) Posted: Mon Jul 21, 2003 5:03 pm
Post subject: Re: Apache as proxy for the web [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If you want to make it being an useful server, enable the : mod_disk_cache

This is my Crazy Proxy configuration :
It's crazy, because it's open to everybody (but the ProxyVia Full
specification solves all the problems) and because the cache is stored
for a long time (1 to 3 days).

[This configuration is not so crazy as it seems to be, if you want to
test / use my server : superfc.dyndns.org (port 80, even for Proxying)]

<IfModule mod_proxy.c>
<IfModule mod_proxy.c>
ProxyRequests On

<Directory proxy:*>
Order allow,deny
Allow from all
</Directory>
</IfModule>


ProxyVia Full

CacheRoot "/home/web/cache"
CacheSize 100
CacheGcInterval 24
CacheMaxExpire 72
CacheLastModifiedFactor 10.0
CacheDefaultExpire 24
#NoCache

ProxyPass /superfc/ <a style='text-decoration: underline;' href="http://superfc.maison.tld/" target="_blank">http://superfc.maison.tld/</a>
ProxyPassReverse /superfc/ <a style='text-decoration: underline;' href="http://superfc.maison.tld/" target="_blank">http://superfc.maison.tld/</a>

</IfModule>



rach a écrit:
 > You just enable the mod_proxy mod_proxy_connect mod_proxy_ftp and
 > mod_proxy_http then:
 >
 > <IfModule mod_proxy.c>
 > ProxyRequests On
 >
 > <Proxy *>
 > Order deny,allow
 > Deny from all
 > Allow from 192.168.1 127.0.0.1 localhost
 > </Proxy>
 >
 > Make sure you have the deny from all in place and add your network data in
 > the allow from part.
 >
 > But Apache isn't a router, so you will have to enable all the clients to use
 > that machine as a proxy.
 >
 > Rach
 >
 > "Francesco M." <markNoSpam.RemoveThis@libero.it> wrote in message
 > news:DKLSa.191101$lK4.5457219@twister1.libero.it...
 >
  >>Hi all,
  >>I need to config Apache so that every request that is coming
  >>is redirected to the <a style='text-decoration: underline;' href="http://www." target="_blank">www.</a> I'd like in other words to use it as a proxy
  >>for Internet. Is it possible ?
  >>I've read about the proxy directive, but I cannot find a way to forward
  >>a route to the web....
  >>any help ?
  >>Thanks a lot
  >>Francesco
  >>
  >>
 >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache as proxy for the web 
Back to top
Login to vote
user2348

External


Since: Jun 28, 2003
Posts: 203



(Msg. 4) Posted: Mon Jul 21, 2003 6:23 pm
Post subject: Re: Apache as proxy for the web [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Florent" <superfc.RemoveThis@superfc.dyndns.org> wrote in message
news:bfgkpo$sjc$1@news-reader5.wanadoo.fr...

 > [This configuration is not so crazy as it seems to be, if you want to
 > test / use my server : superfc.dyndns.org (port 80, even for Proxying)]

Just make sure you keep your logs, or you'll find yourself without much
defence if people use your proxy to down load kiddie porn.

Also, to anyone else reading this thread looking to set up a proxy, leaving
a web proxy open is one thing, but NEVER leave a connect proxy open.

Richard.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache as proxy for the web 
Back to top
Login to vote
wesgroleau1

External


Since: Jul 21, 2003
Posts: 7



(Msg. 5) Posted: Mon Jul 21, 2003 6:23 pm
Post subject: Re: Apache as proxy for the web [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Richard Antony Burton wrote:
 > Just make sure you keep your logs, or you'll find yourself without much
 > defence if people use your proxy to down load kiddie porn.

How do you make it log hits from browsers
on localhost?

I would like to be able to check whether
the kids were doing their homework or
playing games on cartoon network. Smile

All hits (including downloads) from the other
machines on the LAN are logged, but NO requests
from browsers on the webserver are logged.

I've made sure that the proxy is mandated,
and indeed, if I kill Apache, the browsers
can't get out.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache as proxy for the web 
Back to top
Login to vote
mark17

External


Since: Jul 17, 2003
Posts: 4



(Msg. 6) Posted: Mon Jul 28, 2003 1:05 pm
Post subject: Re: Apache as proxy for the web [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Francesco M." <markNoSpam.RemoveThis@libero.it> wrote in message
news:DKLSa.191101$lK4.5457219@twister1.libero.it...
 > Hi all,
 > I need to config Apache so that every request that is coming
 > is redirected to the <a style='text-decoration: underline;' href="http://www." target="_blank">www.</a> I'd like in other words to use it as a proxy
 > for Internet. Is it possible ?
 > I've read about the proxy directive, but I cannot find a way to forward
 > a route to the web....
 > any help ?
 > Thanks a lot
 > Francesco
 >
 >

Hi Francesco,

Here's an extract from my httpd.conf file. I'm on Apache 2.0.45 on Win32.
Make sure you get this right otherwise you could end up as an open proxy!.

--Mark.


LoadModule proxy_module "modules/mod_proxy.so"
LoadModule proxy_connect_module "modules/mod_proxy_connect.so"
LoadModule proxy_http_module "modules/mod_proxy_http.so"


<IfModule mod_proxy.c>
#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
ProxyRequests On
#
<Proxy *>
Order deny,allow
Deny from all
Allow from 10.0.0.3 10.0.0.2 10.0.0.1 127.0.0.1
</Proxy>
#Proxy
#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via:
headers)
# Set to one of: Off | On | Full | Block

proxyblock glocksoft windowsupdate.microsoft.com

</IfModule><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache as proxy for the web 
Back to top
Login to vote
wesgroleau1

External


Since: Jul 21, 2003
Posts: 7



(Msg. 7) Posted: Mon Jul 28, 2003 2:05 pm
Post subject: Re: Apache as proxy for the web [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Mark Edwards wrote:
 > Here's an extract from my httpd.conf file. I'm on Apache 2.0.45 on Win32.

I've got Apache/1.3.26 (Darwin)
(just threw that in for context of what follows)

 > LoadModule proxy_module "modules/mod_proxy.so"
 > LoadModule proxy_connect_module "modules/mod_proxy_connect.so"
 > LoadModule proxy_http_module "modules/mod_proxy_http.so"

I uncommented the first one, but didn't notice the others.
Perhaps that explains my difficulties...
Also, I had to uncomment the corresponding AddModule


 > # Set to one of: Off | On | Full | Block
 >
 > proxyblock glocksoft windowsupdate.microsoft.com

1. I don't think the comment applies to the following line.

2. Is httpd.conf case-sensitive? I have ProxyBlock

3. My block worked when the browser and server were
on the same CPU. When the browser was on a Win32
on my home LAN, the block didn't work. I have no
idea why or how to fix it.

4. I _do_ know that the Wintel was using the proxy, because
all its requests appeared in the server log. (I also can't
figure out why the requests aren't logged when the browser
and server _are_ on the same CPU.)<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache as proxy for the web 
Back to top
Login to vote
mark17

External


Since: Jul 17, 2003
Posts: 4



(Msg. 8) Posted: Mon Jul 28, 2003 10:17 pm
Post subject: Re: Apache as proxy for the web [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

...snip..

  > > # Set to one of: Off | On | Full | Block
  > >
  > > proxyblock glocksoft windowsupdate.microsoft.com
 >
 > 1. I don't think the comment applies to the following line.

Probably not. My httpd.conf file isn't the neatest on this planet Wink)

 > 2. Is httpd.conf case-sensitive? I have ProxyBlock

Lower case seems to work. If it didn't i would expect an error on
startup.

 > 3. My block worked when the browser and server were
 > on the same CPU. When the browser was on a Win32
 > on my home LAN, the block didn't work. I have no
 > idea why or how to fix it.

All my clients seem to be blocked properly. 10.0.0.2 is the main client.

[Tue Mar 11 06:12:37 2003] [warn] proxy: connect to remote machine
windowsupdate.microsoft.com blocked: name windowsupdate.microsoft.com
matched
[Tue Mar 11 06:12:37 2003] [error] [client 10.0.0.2] proxy: Connect to
remote machine blocked returned by
<a style='text-decoration: underline;' href="http://windowsupdate.microsoft.com/ident.cab" target="_blank">http://windowsupdate.microsoft.com/ident.cab</a>

 > 4. I _do_ know that the Wintel was using the proxy, because
 > all its requests appeared in the server log. (I also can't
 > figure out why the requests aren't logged when the browser
 > and server _are_ on the same CPU.)

Requests from my server aren't logged either. Probably as i'm going
directly out. If I was to use 127.0.0.1 for proxy requests in my browser
config, my guess is that requests would then be served by Apache and
appear in the log. Having said that, what you say in 3) seems to run
contradictory to 4) ???

Attached is the link to the faq I used when first setting up my proxy.
<a style='text-decoration: underline;' href="http://www.cs.iastate.edu/~dykstra/projects/proxy.pdf" target="_blank">http://www.cs.iastate.edu/~dykstra/projects/proxy.pdf</a>

I'm not an expert, this is simply the configuration I managed to
get to work (After managing to get myself listed as an open proxy
....Oops!)

--Mark<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache as proxy for the web 
Back to top
Login to vote
wesgroleau1

External


Since: Jul 21, 2003
Posts: 7



(Msg. 9) Posted: Tue Jul 29, 2003 3:14 am
Post subject: Re: Apache as proxy for the web [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > Requests from my server aren't logged either. Probably as i'm going
 > directly out. If I was to use 127.0.0.1 for proxy requests in my browser
 > config, my guess is that requests would then be served by Apache and
 > appear in the log. Having said that, what you say in 3) seems to run
 > contradictory to 4) ???

Yes, it seems contradictory. But I definitely set the browsers
on both machines to use the Mac as proxy. And I'm sure it's done
because the blocking works on the Mac, and the logging works
for the Wintel browsers. Why the difference? I dunno.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache as proxy for the web 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Proxy: can apache do this ? - Hi, I have an SuSE Linux box running apache 1.3.37, as supplied with SuSE. It is setup for both http and https, this works fine, and it is accessable to the internet in general. What I want to do it to have it act as a proxy re-director to enable me...

Apache proxy slow - = Hello! = I have a problem with the extremely slow http-Proxy module the Apache-Webserver. For a HTML side becomes in the directly-access (LAN) approximately 2-3 sec. require (text approximately 11 kBs and approximately 10 kBs for 20..

Newbie having difficulty with proxy - I have Apache serving as a proxy, but three things are not as I want: 1. I'd like it to log all requests It logs requests from another machine, but requests from the machine running Apache are not logged. 2. I'm trying to use ProxyBlock to...

Reverse Proxy Performance - Hi all, I am experimenting with using Apache as a reverse proxy server. The performance seems very slow. I have added the following into the config as my ProxyPass Listen 10.0.0.60:81 <VirtualHost 10.0.0.60:81> ServerAdmin..

Conditional Proxy Authentication - Im having an issue with proxy authentication. I can set it up fine and it works however I want certain sites to not need authentication. For example... &lt;Proxy *windowsupdate*&gt; Order deny,allow Allow...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]