Varnish 4.0.3 with Openlitespeed

#1
I just installed Varnish 4.0.3 on my home centos 7 server.
I was tryed to figure out error 503
With this tutorial i installed Varnish just fine until i got 503 error

1) wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
2) rpm -ivh epel-release-7-2.noarch.rpm
3) yum --enablerepo=epel install varnish -y
4) nano /etc/varnish/varnish.params ---- change here
VARNISH_LISTEN_PORT=80

5) nano /etc/varnish/default.vcl ---- change here
backend default {
.host = "127.0.0.1";
.port = "8088";
}


RESTART OPENLITESPEED
RESTART VARNISH


503 ERROR.


Solution was to change for default listener from lsws webadmin console port from 8088 to 8080
Also nano /etc/varnish/default.vcl ---- change here
FROM:
backend default {
.host = "127.0.0.1";
.port = "8088";
}

TO:

backend default {
.host = "127.0.0.1";
.port = "8080";
}


restart openlitespeed
restart varnish

Everything is working fine now, i don't know if this is a bug but only with 8080 listener port worked for me. hope helps someone.
 

lsfoo

Administrator
#2
Hi skintekx,

Glad everything is working well.

I just did a fresh install of varnish using epel 7-5 on CentOS 7 and openlitespeed from rpm.

After having troubles starting varnish, I was finally able to start it by running the command itself (varnishd -d -f /etc/varnish/default.vcl)

After the successful start, I configured varnish to listen on 80 and had the backend default set to 8088 per the instructions you provided, and restarted varnish.

I accessed 127.0.0.1:80 and was able to get the OLS home page with the correct headers (pasted below).

Perhaps there was an intermediate step that caused the issue?

Kevin

HTTP/1.1 200 OK
last-modified: Thu, 07 May 2015 13:45:18 GMT
content-type: text/html
vary: accept-encoding
date: Thu, 07 May 2015 14:27:57 GMT
server: LiteSpeed
X-Varnish: 2
Age: 0
Via: 1.1 varnish-v4
ETag: W/"691-554b6c6e-41e1193"
Transfer-Encoding: chunked
Connection: keep-alive
Accept-Ranges: bytes
 
Top