Re: varnishd gives 'Cannot create working directory' error
bennett, i had the same issue a week ago. Did you check that you have not many instances of varnishd ? I was using a varnishd from a compile without the --prefix option, when i thought i was using the other compiled with --prefix /opt/varnish try removing all varnish* and recompile all the package. Damien, Bennett Haselton writes: Re-sending this to the whole list... At 03:15 AM 10/21/2007 -0700, =?utf-8?Q?Denis_Br=C3=A6khus?= wrote: At 11:14 AM 10/21/2007 +0200, =?utf-8?Q?Denis_Br=C3=A6khus?= wrote: - Bennett Haselton [EMAIL PROTECTED] wrote: Denis, thanks. How do I determine which user varnish is run under? chown varnish:varnish /var/varnish I tried that command but I got the error chown: `varnish:varnish': invalid user. Did you try starting varnish again? If it throws the same error, try : Yes, I still get the error: Starting varnishd: Cannot create working directory 'NONE/var/varnish/sls-ce3p12' : No such file or directory chmod 777 /var/varnish and then start varnish. Here I run into the same problem -- I did chmod 777 /var/varnish but then when I try to run /etc/rc.d/init.d/varnishd start I still get the error: Starting varnishd: Cannot create working directory 'NONE/var/varnish/sls-ce3p12': No such file or directory I think that what's obviously happening, is that somewhere in the code is some option where you can specify something to go in front of the root directory /var/varnish , and some configuration setting somewhere is saying NONE, and the program is taking that literally and putting NONE in front, so it can't find the directory. But I have no idea where that's happening. Thanks for your help so far though! Then : ps axf | grep varnish and see which user it runs as. Then : chmod 640 /var/varnish ; chown USER:USER /var/varnish (substitute USER with the user you got when checking ps). Regards -- Denis ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
varnishd config.
Hello, I'm having som problems getting my varnish to work as i want to. I'm running a minimal config: backend default { set backend.host = host; set backend.port = port; } sub vcl_recv { if (req.request == GET req.url ~ \.(gif|png|css|js)$) { lookup; } } When I go to the page it starts caching all the files and on reload all the files are delivered from varnishd. But when i go to a certain php on the page it forwards every request to apache and when going back to one of the former working tabs they also go I put a few expire-lines in my virtualhost-config: ExpiresActive On ExpiresByType image/gif access plus 3 hours and so on, but it won't work. Here are two examples of the headers tx:ed and rx:ed: http://www.nangilima.se/varnishd/working.txt http://www.nangilima.se/varnishd/nonworking.txt I've noticed that in the working example apache provides last-modified and a few other things in the response, but why doesn't it do that in the nonworking? Its the same virtualhost with all the same settings but another .php file. I'm always using fully reload when testing so the browsers cache doesn't lead me astray. Thanks in advance Regards Dan ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Setting default_ttl in vcl file
This mail has stayed unanswered on varnish-dist, but I think someone on varnish-misc may be able to answer. Ingvar Steve Scally [EMAIL PROTECTED] said on [EMAIL PROTECTED] Hello, I have just started to use varnish and was looking into the default cache time of an object / item, etc. I know the default_ttl is 120 seconds and I was looking to change that to 3600 seconds. From the documentation and previous mail archives I have found three ways to set this. Two ways are through the rc.d and rc.conf files and the last is through the vcl. A. /usr/local/etc/rc.d/varnishd file Create a variable called varnishd_ttl and set it to 3600. : ${varnishd_ttl=3600} Edit varnishd_flags and add my new variable : ${varnishd_flags=-P ${pidfile} -a ${varnishd_listen} -f $ {varnishd_config} -T ${varnishd_telnet} -s ${varnishd_storage} -t $ {varnishd_ttl}} B. /etc/rc.conf Create a variable called varnishd_ttl and set it to 3600. : ${varnishd_ttl=3600} Edit varnishd_flags and add my new variable varnishd_enable=YES varnishd_listen=mb-prv.kcilink.com:80 varnishd_storage=file,/var/tmp,512M varnishd_config=/usr/local/etc/varnish/morebiz.vcl varnishd_ttl=3600 varnishd_flags=-P ${pidfile} -a ${varnishd_listen} -f $ {varnishd_config} -T ${varnishd_telnet} -s ${varnishd_storage} -t $ {varnishd_ttl} c. /usr/local/etc/varnish/default.vcl *if (obj.ttl 3600s) { set obj.ttl = 3600s; } *not exact just scratch code. Now my question, is there a more direct way to change the default_ttl either through configuration files or .vcl file? If these are pretty much the only three ways that is fine, I just wanted to make sure I wasn't skipping over any options. Thank you in advance for your help. Steve ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: varnishd config.
By default, Varnish doesn't cache any responses where cookies are involved (in your case the php session id). There are a few messages in the mailing list archive that explain how to override this behavior. Jeff On Oct 22, 2007, at 11:27 AM, Dan Deshayes wrote: Hello, I'm having som problems getting my varnish to work as i want to. I'm running a minimal config: backend default { set backend.host = host; set backend.port = port; } sub vcl_recv { if (req.request == GET req.url ~ \.(gif|png|css|js)$) { lookup; } } When I go to the page it starts caching all the files and on reload all the files are delivered from varnishd. But when i go to a certain php on the page it forwards every request to apache and when going back to one of the former working tabs they also go I put a few expire-lines in my virtualhost-config: ExpiresActive On ExpiresByType image/gif access plus 3 hours and so on, but it won't work. Here are two examples of the headers tx:ed and rx:ed: http://www.nangilima.se/varnishd/working.txt http://www.nangilima.se/varnishd/nonworking.txt I've noticed that in the working example apache provides last-modified and a few other things in the response, but why doesn't it do that in the nonworking? Its the same virtualhost with all the same settings but another .php file. I'm always using fully reload when testing so the browsers cache doesn't lead me astray. Thanks in advance Regards Dan ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: Setting default_ttl in vcl file
Ingvar Hagelund [EMAIL PROTECTED] writes: Steve Scally [EMAIL PROTECTED] writes: Now my question, is there a more direct way to change the default_ttl either through configuration files or .vcl file? If these are pretty much the only three ways that is fine, I just wanted to make sure I wasn't skipping over any options. Thank you in advance for your help. This mail has stayed unanswered on varnish-dist, but I think someone on varnish-misc may be able to answer. The default TTL can be configured on the command line with -t ttl or (as any other run-time parameter) with -p default_ttl=ttl. The FreeBSD rc script does not currently have a variable for setting the default TTL directly, nor a mechanism for setting run-time parameters in general. I could either add code to the rc script to read in a list of run-time parameters and pass them on the command line, or we could add code to varnishd to read initial values from a file. I prefer the former, but we need to add similar code to the Debian and RedHat init scripts as well. DES -- Dag-Erling Smørgrav Senior Software Developer Linpro AS - www.linpro.no ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc