Configure Squid proxy to redirect to Parent Proxy if direct Internet fails

Hi,

Here is the config to configure Squid proxy to redirect to parent proxy.

http_port 8080
acl manager proto cache_object
acl localhost src 127.0.0.1
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 443 # https
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all

icp_access deny all
htcp_access deny all

cache_peer 10.151.8.10 parent 3128 0 name=prod default

prefer_direct on
cache_peer_access prod allow all

hierarchy_stoplist cgi-bin ?
cache_mem 4000 MB
maximum_object_size_in_memory 5000 KB
cache_dir ufs /var/cache/squid 100000 64 512
maximum_object_size 40960 KB
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/log/squid/squid.pid
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 0
coredump_dir /var/cache