You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Johnny Stork <li...@johnnystork.ca> on 2011/06/14 22:21:09 UTC

Basic Caching Forward Proxy Configuration?

Please excuse the newbie questions. I am trying to setup TS on an internal server, to use as a basic caching forward proxy. Install went fine on the CentOS x64 box. I tried finding some basic configuration docs, but none could be found and some I found were not consistent. 

The settings I changed were: 

##records.config: 

CONFIG proxy.config.proxy_name STRING 192.168.1.182 (TS server IP) 

CONFIG proxy.config.reverse_proxy.enabled INT 0 (not trying reverse proxy yet, only want forward) 

CONFIG proxy.config.http.cache.http INT 1 (enabled forward caching proxy) 

##remap.config: 

Note sure what should, if anything, go in here. One article suggested this: 

regex_map http://( .*) http://$1 

But with this, or nothing in remap.config, I dont get any pages loading in a browser using 192.168.1.182:8080 as a proxy. 


TS seems to start properly: 

Jun 14 13 :08:32 epiphany traffic_cop[8506]: --- Cop Starting [Version: Apache Traffic Server - traffic_cop - 2.1.6-unstable - (build # 12816 on Feb 28 2011 at 16:35:56)] --- 
Jun 14 13 :08:32 epiphany traffic_cop[8506]: traffic_manager not running, making sure traffic_server is dead 
Jun 14 13 :08:32 epiphany traffic_cop[8506]: spawning traffic_manager 
Jun 14 13 :08:32 epiphany traffic_manager[8508]: NOTE: --- Manager Starting --- 
Jun 14 13 :08:32 epiphany traffic_manager[8508]: NOTE: Manager Version: Apache Traffic Server - traffic_manager - 2.1.6-unstable - (build # 12816 on Feb 28 2011 at 16:32:31) 
Jun 14 13 :08:32 epiphany traffic_manager[8508]: NOTE: RLIMIT_NOFILE(7):cur(10000),ma 10000) 
Jun 14 13 :08:32 epiphany traffic_manager[8508]: { 4751219915 5152} STATUS: opened /var/log/trafficserver/manager.log 
Jun 14 13 :08:34 epiphany traffic_server[8519]: NOTE: --- Server Starting --- 
Jun 14 13 :08:34 epiphany traffic_server[8519]: NOTE: Server Version: Apache Traffic Server - traffic_server - 2.1.6-unstable - (build # 12816 on Feb 28 2011 at 16:34:49) 
Jun 14 13 :08:34 epiphany traffic_server[8519]: { 4776109634 1520} STATUS: opened /var/log/trafficserver/diags.log 



But if I set a browser to use http://192.168.1.182:8080 as a proxy server, nothing will load and error.log shows only lines like this. 

20110614.12h59m14s RESPONSE: sent 192.168.1.29 status 404 (Not Found) for ' http://www.google.ca/ ' 


Not sure what I am missing in order to get a basic caching forward proxy configuration working. Would be grateful for any suggestions. 

Johnny Stork 

Re: Basic Caching Forward Proxy Configuration?

Posted by Leif Hedstrom <zw...@apache.org>.
On 06/14/2011 02:28 PM, Leif Hedstrom wrote:
>
> You should not have to add any mapping rules to remap.config (see 
> above config setting). Attached is a little "sample" script from our 
> contrib perl area, that shows the settings I'd suggest (minimum) that 
> you should modify for reverse proxy.


Grrrr, for "forward proxy" (obviously). Different settings are required 
for reverse proxy.

-- leif


Re: Basic Caching Forward Proxy Configuration?

Posted by Johnny Stork <li...@johnnystork.ca>.
Thanks kindly Leif, that did the trick! 

Quick question. I also have another public-facing server with about the same horsepower (dual 3.6ghz dual-core Xeon vs dual 3.8ghz dual-core Xeon). Do you think there would be any benefits to using/running TS for internal clients, using the public facing server (not behind the firewall), as opposed to the internal server running TS, which is behind a firewall/router? 


Thanks again for you quick and straight-to-the-point help! 


----- Original Message -----

From: "Leif Hedstrom" <zw...@apache.org> 
To: users@trafficserver.apache.org 
Cc: "Johnny Stork" <li...@johnnystork.ca> 
Sent: Tuesday, June 14, 2011 1:28:48 PM 
Subject: Re: Basic Caching Forward Proxy Configuration? 

On 06/14/2011 02:21 PM, Johnny Stork wrote: 


Please excuse the newbie questions. I am trying to setup TS on an internal server, to use as a basic caching forward proxy. Install went fine on the CentOS x64 box. I tried finding some basic configuration docs, but none could be found and some I found were not consistent. 

The settings I changed were: 

##records.config: 

CONFIG proxy.config.proxy_name STRING 192.168.1.182 (TS server IP) 

CONFIG proxy.config.reverse_proxy.enabled INT 0 (not trying reverse proxy yet, only want forward) 

CONFIG proxy.config.http.cache.http INT 1 (enabled forward caching proxy) 



You also need to disable remap required: 

CONFIG proxy.config.url_remap.remap_required INT 0 


<blockquote>


##remap.config: 

Note sure what should, if anything, go in here. One article suggested this: 

regex_map http://( .*) http://$1 

</blockquote>

You should not have to add any mapping rules to remap.config (see above config setting). Attached is a little "sample" script from our contrib perl area, that shows the settings I'd suggest (minimum) that you should modify for reverse proxy. 

-- leif 



Re: Basic Caching Forward Proxy Configuration?

Posted by Leif Hedstrom <zw...@apache.org>.
On 06/14/2011 02:21 PM, Johnny Stork wrote:
> Please excuse the newbie questions. I am trying to setup TS on an 
> internal server, to use as a basic caching forward proxy. Install went 
> fine on the CentOS x64 box. I tried finding some basic configuration 
> docs, but none could be found and some I found were not consistent.
>
> The settings I changed were:
>
> ##records.config:
>
> CONFIG proxy.config.proxy_name STRING 192.168.1.182 (TS server IP)
>
> CONFIG proxy.config.reverse_proxy.enabled INT 0 (not trying reverse 
> proxy yet, only want forward)
>
> CONFIG proxy.config.http.cache.http INT 1 (enabled forward caching proxy)

You also need to disable remap required:

     CONFIG proxy.config.url_remap.remap_required INT 0

>
> ##remap.config:
>
> Note sure what should, if anything, go in here. One article suggested 
> this:
>
> regex_map http://( <http://%28/>.*) http://$1 <http://$1/>

You should not have to add any mapping rules to remap.config (see above 
config setting). Attached is a little "sample" script from our contrib 
perl area, that shows the settings I'd suggest (minimum) that you should 
modify for reverse proxy.

-- leif