Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a Squid3 server set up that's working fine, logging everything, but every time a user visits a website that responds with a 301 or 302 redirect, the request dies and does not redirect the user's browser.

All the research I've done mentions using a rewrite_program or something along those lines, but that appears to be more for intercepting user requests and rewriting them before retrieving them. It seems odd to me that squid would require something like this for external redirects.

Am I doing something wrong? Configuration below.

acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

# general access
acl localhost src 127.0.0.1
acl localnet src 10.0.0.0/8
acl Safe_ports port 80 443 1025-65535

# User Groups
acl blocked_ips src "/etc/squid3/ip.addresses.blocked"
acl fullaccess_ips src "/etc/squid3/ip.addresses.fullaccess"

http_access allow fullaccess_ips
http_access allow blocked_ips

visible_hostname [mydomainhere].com
always_direct allow all

forwarded_for off

error_directory /usr/share/squid-langpack/English

icp_access allow localnet
icp_access deny all

htcp_access allow localnet
htcp_access deny all

http_port 3128 transparent

hierarchy_stoplist cgi-bin ?

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

refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern (cgi-bin|\?)    0   0%  0
refresh_pattern .       0   20% 4320

icp_port 3130
coredump_dir /var/log/squid3

Thanks for any help... I'm stuck and the client's bellowing that it's not working properly.

share|improve this question
    
Does the client browser just not get a response at all, or what error do they get? Squid shouldn't be following the redirect, it should just pass the 30x response back to the client. –  Shane Madden Mar 2 '12 at 6:14
    
Browser gets no response at all... after a while it does a "cannot display the webpage" error screen. –  Rob Williams Mar 2 '12 at 6:19
    
Sniff your traffic. SQuid may be sending the redirect but you don't see it. –  diegows Apr 19 '12 at 21:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.