Ubuntu 17.04
Sponsored Link

Reverse Proxy Setting2017/04/23

 
Configure Squid as a reverse proxy server.
[1] Configure Squid.
root@prox:~#
vi /etc/squid/squid.conf
# line 1192: add ( allow all http access )

http_access allow all
# line 1614: specify backend Web server

http_port
80 accel defaultsite=www.srv.world
# line 3037: add

cache_peer www.srv.world parent 80 0 no-query originserver
# line 3188: add (memory cache size)

cache_mem 256 MB
# line 3460: add

# number means ⇒ [disk cache size] [number of directories on top level] [number of directories on 2nd level]

cache_dir ufs /var/spool/squid 256 16 256
# line 5591: add (define hostname)

visible_hostname prox.srv.world
root@prox:~#
systemctl restart squid
[2] Change DNS or Router's settings if need, and make it listen http requests on Squid server. It's OK if backend http server responds like follows.
Matched Content