[squid-users] Re: Squid3 Reverse Proxy based on url path

From: rainolf <rainolf_at_gmail.com>
Date: Fri, 21 May 2010 04:58:11 -0700 (PDT)

I've changed my configuration and now seem to work like i want....I
eliminate the fake url and replaced with right dns records....

This is my configuration:

http_port 80 vhost vport=90 protocol=http defaultsite=webportal.domain.com
acl http proto http
acl port80 port 80
acl domain2_com dstdomain world.webmail.domain.com
acl domain1_com dstdomain italy.webmail.domain.com
#acl domain3_com dstdomain webportal.domain.com
acl hrm urlpath_regex ^/dbghrm
acl fax urlpath_regex ^/avantfax
acl ftp urlpath_regex ^/webftp
acl portal urlpath_regex ^/webportal

http_access allow all

cache_peer xxx.xxx.xxx.xxx parent 80 0 no-query originserver name=domain1
cache_peer_access domain1 allow domain1_com

cache_peer xxx.xxx.xxx.xxx parent 80 0 no-query originserver name=domain2
cache_peer_access domain2 allow domain2_com

#cache_peer xxx.xxx.xxx.xxx parent 90 0 no-query originserver name=domain3
#cache_peer_access domain3 allow domain3_com

cache_peer xxx.xxx.xxx.xxx parent 8080 0 no-query originserver name=domain4
cache_peer_access domain4 allow portal
cache_peer_access domain4 deny all

cache_peer xxx.xxx.xxx.xxx parent 80 0 no-query originserver name=dbghrm
cache_peer_access dbghrm allow hrm
cache_peer_access dbghrm deny all

cache_peer xxx.xxx.xxx.xxx parent 80 0 no-query originserver name=dbgfax
cache_peer_access dbgfax allow fax
cache_peer_access dbgfax deny all

cache_peer xxx.xxx.xxx.xxx parent 80 0 no-query originserver name=ftpweb
cache_peer_access ftpweb allow ftp
cache_peer_access ftpweb deny all

access_log /var/log/squid3/access.log squid

http_access allow http port80 domain2_com domain1_com portal
http_access allow fax
http_access allow ftp
http_access allow hrm

dns_nameservers xxx.xxx.xxx.xxx

Like i said in previous days i would like to place an instance of apache
server on reverse proxy in order to have a small page where put links to all
internal webserver proxied by squid.

in few words i will have apache with a small webpage and squid3 on the same
server .

My problem is :

How can i do to open only one port ( ex. 80 ) on firewall in order to have
the webpage with links without having problem to forward requests to
internal web servers the listen on the same port?

Can i make squid to forward the request on port 80 to internal webserver
even if also apache is listening on that port?

Thank you

View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid3-Reverse-Proxy-based-on-url-path-tp2197692p2226037.html
Sent from the Squid - Users mailing list archive at Nabble.com.
Received on Fri May 21 2010 - 11:58:12 MDT

This archive was generated by hypermail 2.2.0 : Sat May 22 2010 - 12:00:06 MDT