Search squid archive

Re: Redirection - How to in English for non programmers...

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

 



tor 2009-02-12 klockan 16:04 +1030 skrev Geoffrey ROBERTS:

> So we have url:
> 
> http://host.site.name:8080/rest/of/link/todocument 
> 
> and we need it to become
> 
> http://host.site.name/rest/of/link/todocument 
> 
> I am not a C programmer and I had an attempt at using the url_rewrite with a php script I copied and modified
> from the wiki, but all that happened was that squid started refusing connections, so I assume I did something wrong.
> I took out my changes from squid.conf and restarted and it's fine again.
> 
> Is there a method (preferably not involving authoring scripts)that can do this easily/quickly?

You can probably do it by a cache_peer, telling Squid to connect to port
80 on that server.

cache_peer ip.of.docushare.server parent 80 0 no-query originserver name=docushare_server
acl docushare dstdomain host.site.name
cache_peer_access docushare_server allow docushare
never_direct allow docushare

If you have other cache_peer then also add
cache_peer_access <otherpeer> deny docushare
repeat for each cache_peer.

Or alternatively here is a small perl url rewriter doing the needed rewrites..

#!/usr/bin/perl -p
BEGIN { $|=1; }
s|http://host.site.name:8080\b|http://host.site.name|;

Regards
Henrik


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

  Powered by Linux