Search squid archive

Re: Reverse proxy with URL rewriting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for the explanations. I made squid working with url rewriting.

But i've got an other problem, each web server use cookie methods and I
need to rewrite the Cookie path too. Is it possible ? I didn't find a
solution on the FAQ.
example :
Web server1 >> squid :
HTTP/1.1 200 OK
Set-Cookie: cookie=[Token]; Path=/

squid >> user:
HTTP/1.1 200 OK
Set-Cookie: cookie=[Token]; Path=/serv1


Mathieu:
That's my configuration:
squid.conf
----------

http_port <pub-ip>:80 vhost no-connection-auth

acl serv1-path urlpath_regex \/serv1(\/|$)
acl serv2-path urlpath_regex \/serv2(\/|$)

url_rewrite_host_header off

acl all src 0.0.0.0/0.0.0.0

acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255

acl Safe_ports port 80

http_access deny !Safe_ports
http_access deny !serv1-path !serv2-path

http_reply_access allow all

http_access allow manager localhost
http_access deny manager

always_direct allow all

url_rewrite_program /etc/squid/redirector.pl
url_rewrite_children 5

http_access deny all

/etc/squid/redirector.pl
------------------------

#!/usr/bin/perl -p
BEGIN { $|=1; }
s%^http://squid.ext.com/serv1%http://server1.intranet.com%&&; next;
s%^http://squid.ext.com/serv2%http://server2.intranet.com%&&; next;


regards
Sylvain


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux