security.vcl icon indicating copy to clipboard operation
security.vcl copied to clipboard

Installation on varnish 4

Open intelbg opened this issue 10 years ago • 6 comments

Hello, I would like to ask you if this module is compatible with varnish 4, because I can't run it on CentOS 6.5 with varnish 4. Testing configuration looks like this:

[/usr/local/src/security.vcl-master]# varnishd -C -f /etc/varnish/default.vcl Message from VCC-compiler: Symbol not found: 'req.request' (expected type BOOL): ('/etc/varnish/security/modules/content-type.vcl' Line 12 Pos 14) if(( req.request == "GET" || req.request == "HEAD" ) -------------###########------------------------------------

Running VCC-compiler failed, exited with 2

VCL compilation failed

If I replace the functions in all vcls with the new one again does not works. Is there someone who did it successfully on varnish 4 or can you please provide me some recoomendations? If this is not compatible with varnish 4 which module related to security rules is compatible (tryed also vsf - the same)?

intelbg avatar Apr 27 '15 09:04 intelbg

Hi, security.vcl is not compatible with varnish 4. We are planning on introducing v4 compatibility in the next month.

comotion avatar Apr 27 '15 14:04 comotion

I understand, but I need to end this project until 10 days. Is there a chance to work if I replace by some way the functions or is there any related module I can use for this purpose?

On 04/27/2015 05:23 PM, Kacper Why wrote:

Hi, security.vcl is not compatible with varnish 4. We are planning on introducing v4 compatibility in the next month.

— Reply to this email directly or view it on GitHub https://github.com/comotion/security.vcl/issues/27#issuecomment-96672819.

intelbg avatar Apr 28 '15 13:04 intelbg

We have started work on the 4.0 branch in VSF. You are welcome to contribute by forking & making a pull request. https://github.com/comotion/VSF/issues/9 is used to track progress.

A good start is to do the automated conversion with https://github.com/fgsch/varnish3to4 and then do manual fixups after (automated conversion won't fix all issues).

comotion avatar Apr 28 '15 14:04 comotion

This is great news. Depending on how many commands need changing for the varnish3to4 script it may be easier to update his python script to easily convert them all. Unfortunately I'm not experienced in varnish so can't really help.

I also don't see the 4.0 branch here, is it on another repo?

blindpet avatar May 09 '15 20:05 blindpet

No, you cannot automate the whole 3>4 conversion process. That's why it's not supported.

As with everything Varnish, make sure you understand what's going on.

In this specific case use VSF, which is a different project than security.vcl, but it can be seen as its natural continuation. On 9 May 2015 22:54, "blindpet" [email protected] wrote:

This is great news. Depending on how many commands need changing for the varnish3to4 script it may be easier to update his python script to easily convert them all. Unfortunately I'm not experienced in varnish so can't really help.

I also don't see the 4.0 branch here, is it on another repo?

— Reply to this email directly or view it on GitHub https://github.com/comotion/security.vcl/issues/27#issuecomment-100544150 .

huayra avatar May 10 '15 10:05 huayra

Right, VSF and its 4 vmods don't compile for Varnish 4 when I tried, maybe I did something wrong.

blindpet avatar May 10 '15 19:05 blindpet