After installation of varnish & hitch on ubuntu 20.04 server, getting following error:
curl: (52) Empty reply from server
Tutorial I am following:
[https://docs.varnish-software.com/tutorials/hitch-letsencrypt/][1]
In my case, I have two servers s1 & s2 both have ubuntu 20.04 server installed. local static ip of s1:
192.168.1.105
local static ip of s2:
192.168.1.106
On s1 virtualmin pannel is installed & every thing working fine. So i decided to make a saparate cache server & installed varnish & hitch as:
sudo apt install varnish -y
sudo apt install hitch -y
changes in default.vcl file:
backend default {
.host = "192.168.1.105";
.port = "80";
}
hitch.conf:
# Run 'man hitch.conf' for a description of all options.
frontend = {
host = "*"
port = "443"
}
backend = "[127.0.0.1]:8443" # 6086 is the default Varnish PROXY port.
#workers = 4 # number of CPU cores
#daemon = on
# We strongly recommend you create a separate non-privileged hitch
# user and group
#user = "hitch"
#group = "hitch"
# Enable to let clients negotiate HTTP/2 with ALPN. (default off)
# alpn-protos = "h2, http/1.1"
# run Varnish as backend over PROXY; varnishd -a :80 -a localhost:6086,PROXY ..
#write-proxy-v2 = on # Write PROXY header
#pem files
pem-file = "/etc/letsencrypt/live/example.com/hitch-bundle.pem"
unit file:
[Unit]
Description=Varnish HTTP accelerator
Documentation=https://www.varnish-cache.org/docs/6.1/ man:varnishd
[Service]
Type=simple
LimitNOFILE=131072
LimitMEMLOCK=infinity
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :80 -a localhost:8443,proxy -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,3G
ExecReload=/usr/share/varnish/varnishreload
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
[Install]
WantedBy=multi-user.target
Note: I have no idea about networking, so main router connected with second router and both s1 & s2 directly connected with second router. Also dmz host ip changed from s1 ip to s2 ip.
Result:
curl -i https://example.com
curl: (52) Empty reply from server.
upon This command varnishlog -g request -q "ReqUrl eq ’/’" VSM: Could not get hold of varnishd, is it running?
Please guide thanks.
Found
The document has moved here.
– Amir Jan 12 '22 at 09:33