Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provided VCL prevent Varnish to start #3

Open
pastanislas opened this issue Jun 1, 2011 · 4 comments
Open

Provided VCL prevent Varnish to start #3

pastanislas opened this issue Jun 1, 2011 · 4 comments

Comments

@pastanislas
Copy link

Hello,
First of all thank you very much for sharing your work and making it open source !
I'm completely new to varnish and I'm trying to setup your module over nginx. I mean I do not use apache as webserver but nginx.
The maggento module installation went smoothly, I confirm it is working on 1.4.1.1.
I have installed varnish but when I replace default.vcl provided with setup with yours, Varnish refuses to start.
I'm using Varnish 2.0.6-2.el5 on red hat.
/etc/init.d/varnish start just give me [failed] whereas with default almost empty vcl it works.
Is there a specific varnish version to use ?
Do you think that it's coming from me using nginx ?
Thank you

@madalinoprea
Copy link
Owner

Hi pastanislas,

My tests were done on Varnish 2.1.0, which contains changes of VCL syntax (http://www.varnish-cache.org/releases/varnish-cache-2.1.0). I believe you have to replace beresp occurrences with obj and should work, I had a similar problem long time ago and I believethis worked for me.

http://www.gossamer-threads.com/lists/varnish/misc/14561

Hope this helps.
Mario

@Dx3webs
Copy link

Dx3webs commented Sep 11, 2011

hi all.. as above this looks just like what we are after...

however, after jumping through hoop after hoop it looks like we have fallen at the final hurdle..

so far I have

varnishd -f /etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000 -a 109.203.113.185:80
Message from VCC-compiler:
Expected ';' got '", "'
(program line 174), at
('input' Line 24 Pos 65)
set req.http.X-Forwarded-For = req.http.X-Forwarded-For ", " client.ip;
----------------------------------------------------------------####-----------

Running VCC-compiler failed, exit 1

VCL compilation failed

After commenting out the offending line...

Expected ';' got '('
(program line 174), at
('input' Line 35 Pos 14)
purge("req.url ~ " req.url);

Would a full list be useful or does this whole thing need rewriting for v 3?

Also, get a 404 in system > config > varnish options

@madalinoprea
Copy link
Owner

Hi,

Check this list if you need to migrate varnish configuration to Varnish 3.0: https://www.varnish-cache.org/docs/trunk/installation/upgrade.html

Currently I don't have a vm with Varnish 3.0 to test it but the list from the above link seems to cover issues mentioned by you (string concatenation, purge changed to ban).

For 404 error I believe you need to logout from admin and login back so that new permissions will get associated to your account.

Let me know if you succeeded to upgrade varnish config.

Cheers,
Mario

@gionni2010
Copy link

hello i don't know how to pull requests on github, but i made modification to the vlc file to make it work on varnish 3.0

My file is here: http://c359372.r72.cf3.rackcdn.com/default.vcl

But i had to comment a variable varnish 3.0 doesn't recognize, you can read the comment on line 137. Someone know if this is a good solution?

Sorry for my english, and thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants