After looking for in google, and reading some post around here and
other forums, made the same question in other webs, i finally decided
to post a question.
I'm trying to setup a `squid reverse proxy`, first tried with version
3.1.18, and now i'm trying with 3.3 stable, but the result is almost
the same with both, i'm using computer with Debian 6, i started like
this:
root@dbp:~#./configure --enable-arp-acl
--enable-storeio="aufs,ufs" --with-large-files --disable-translation
--enable-delay-pools
root@dbp:~#make all
root@dbp:~#make install
My squid.conf
http_port XXX.XX.XXX.XX:80 accel defaultsite=www.mydomain.com vhost
forwarded_for on
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
cache_peer XXX.XX.XXX.XX parent 80 0 no-query originserver
name=peerDOMAIN login=PASS
acl www_domain url_regex -i www.mydomain.com other.mydomain.com
cache_peer_access peerDOMAIN allow www_domain
cache_peer_access peerDOMAIN deny all
cache_peer XXX.XX.XXX.XX parent 80 0 no-query originserver
name=peer2DOMAIN login=PASS
acl www2_domain url_regex -i more.mydomain.com
cache_peer_access peer2DOMAIN allow www2_domain
cache_peer_access peer2DOMAIN deny all
acl Safe_ports port 80 # http
acl Safe_ports port 1025-65535 # unregistered ports
http_access allow www_domain
http_access allow www2_domain
http_access deny !Safe_ports
http_access allow localhost
http_access deny all
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st
"%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
cache_dir ufs /usr/local/squid/var/cache 700 16 256
coredump_dir /usr/local/squid/var/cache
access_log /usr/local/squid/var/logs/access.log combined
cache_effective_user proxy
header_replace X-Forwarded-For
via off
reply_header_access X-Cache-Lookup deny all
reply_header_access X-Squid-Error deny all
reply_header_access X-Cache deny all
I have 2 `cache_peer` cuz i have 2 www servers, the first one with IIS
and Sharepoint, the other is an Apache web server, `ACCEPT` in all
iptables chain, and ready to test, and here is the thing, when i open
the Internet Explorer and try to open `www.mydomain.com`, it stay
loading forever, and never show the web page, just the title, using
Mozilla firefox+Firebug, in the NET tab, i can see old the request the
browser is making, sometimes a request to a .js|.css hangs an never
end, if i press Ctrl+U i can see the full html code of the page.
In the squid `access.log`, i can see
XXX.XX.XXX.XX - - [09/Apr/2013:16:30:27 -0400] "GET
http://www.mydomain.com/ HTTP/1.1" 200 3002 "-" "Mozilla/5.0 (Windows
NT 5.1; rv:18.0) Gecko/201001$
XXX.XX.XXX.XX - - [09/Apr/2013:16:30:27 -0400] "GET
http://www.mydomain.com/css/styles.css HTTP/1.1" 206 28583
"http://www.mydomain.com/" "Mozilla$
XXX.XX.XXX.XX - - [09/Apr/2013:16:30:27 -0400] "GET
http://www.mydomain.com/css/main.css HTTP/1.1" 304 180
"http://www.mydomain.com/" "Mozilla/5.0$
XXX.XX.XXX.XX - - [09/Apr/2013:16:30:27 -0400] "GET
http://www.mydomain.com/images/logo.jpg HTTP/1.1" 304 172
"http://www.mydomain.com/" "Mozilla/$
XXX.XX.XXX.XX - - [09/Apr/2013:16:30:27 -0400] "GET
http://www.mydomain.com/images/home-body.jpg HTTP/1.1" 304 173
"http://www.mydomain.com/" "Moz$
XXX.XX.XXX.XX - - [09/Apr/2013:16:45:27 -0400] "GET
http://www.mydomain.com/js/jquery/jquery-1.6.1.min.js HTTP/1.1" 206
8547 "http://kratos.eleccmg.une$
XXX.XX.XXX.XX - - [09/Apr/2013:17:03:00 -0400] "GET
http://www.mydomain.com/ HTTP/1.1" 200 3002 "-" "Mozilla/5.0 (Windows
NT 5.1; rv:18.0) Gecko/201001$
XXX.XX.XXX.XX - - [09/Apr/2013:17:03:00 -0400] "GET
http://www.mydomain.com/css/styles.css HTTP/1.1" 304 174
"http://www.mydomain.com/" "Mozilla/5$
XXX.XX.XXX.XX - - [09/Apr/2013:17:03:00 -0400] "GET
http://www.mydomain.com/css/main.css HTTP/1.1" 304 180
"http://www.mydomain.com/" "Mozilla/5.0$
This is request/response header viewed with the Firebug
Response
Cache-Control no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Connection keep-alive
Content-Length 2657
Content-Type text/html; charset=utf-8
Date Tue, 09 Apr 2013 22:01:14 GMT
Expires Thu, 19 Nov 1981 08:52:00 GMT
Pragma no-cache
Server Apache/2.2.21 (Win64) PHP/5.3.8
X-Powered-By PHP/5.3.8
Request
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3
Cache-Control max-age=0
Connection keep-alive
Cookie clienthtml=c36tursd80scufn3g1h2ng4ag4
Host kratos.eleccmg.une.cu
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101
Firefox/18.0
This is request/response header viewed with Wireshark, the browser
hangs downloading this file, it never ends
GET /js/jquery/jquery-1.6.1.min.js HTTP/1.1
Host: www.mydomain.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101
Firefox/18.0
Accept: */*
Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://www.mydomain.com/
Cookie: clienthtml=c36tursd80scufn3g1h2ng4ag4
Connection: keep-alive
Range: bytes=63386-
If-Range: "16000000014b68-164ce-4a407ef9fc598"
Cache-Control: max-age=0
HTTP/1.1 206 Partial Content
Last-Modified: Tue, 24 May 2011 16:18:18 GMT
Accept-Ranges: bytes
Content-Type: application/javascript
Date: Tue, 09 Apr 2013 22:01:14 GMT
Server: Apache/2.2.21 (Win64) PHP/5.3.8
ETag: "16000000014b68-164ce-4a407ef9fc598"
Age: 0
Connection: keep-alive
Content-Range: bytes 63386-91341/91342
Content-Length: 27956
So, do i need something else besides this config?
Does the kernel need an extra setup, module or something?
Is this a wrong squid setup for this purpose?
The client machine is a Virtual Machine in a VMWare ESX server, does
it matter?(enything else is not virtual)
Is this some bug of squid?? (i have tried with to diferent versions,
same result)
Need some help here
Thanks