我有2台服务器,一台安装了magento 2(ip-129.89.188.244 80端口),另一台安装了varnish(ip-129.89.188.245 80端口)
我的清漆配置:
文件/ etc/default/varnish: -
DAEMON_OPTS="-a :80 \
-T 127.0.0.1:6082 \
-b 129.89.188.244:80 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-s malloc,256m"
Run Code Online (Sandbox Code Playgroud)
netstat -tulpn: -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1288/sshd
tcp 0 0 127.0.0.1:6082 0.0.0.0:* LISTEN 11115/varnishd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 11115/varnishd
tcp6 0 0 :::22 :::* LISTEN 1288/sshd
tcp6 0 0 :::80 :::* LISTEN 11115/varnishd
Run Code Online (Sandbox Code Playgroud)
/etc/varnish/default.vcl: -
# VCL version 5.0 is not supported so it should be 4.0 even though actually …Run Code Online (Sandbox Code Playgroud)