<div dir="ltr">Hi, <div><br></div><div>I've changed the backend default back to 8080.</div><div><br></div><div>Security group on aws for port 8080 isn't open. </div><div><br></div><div>and changed /etc/sysconfig/varnish to</div><div><br></div><div><div>DAEMON_OPTS="-a :80 \</div><div> -f /etc/varnish/default.vcl \</div><div> -T localhost:6082 \</div><div> -b localhost:8080 \</div><div> -u varnish -g varnish \</div><div> -s file,/var/lib/varnish/varnish_storage.bin,256m"</div></div><div><br></div><div>When I run varnishstat I don't get any useful information</div><div><br></div><div><div>0+00:00:00</div><div>Hitrate ratio: 0 0 0</div><div>Hitrate avg: 0.0000 0.0000 0.0000</div><div><br></div></div><div>How do you start the varnish daemon? I've tried sudo `bash -x /etc/init.d/varnish restart` I get <a href="http://pastebin.com/pTikCS7Y">http://pastebin.com/pTikCS7Y</a> and still nothing in varnishlog</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 15, 2016 at 10:45 AM, Tobias Honacker <span dir="ltr"><<a href="mailto:t.honacker@googlemail.com" target="_blank">t.honacker@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">FYI: Your backend listen on Port 8080, so you should define this in your varnish config (.vcl) in /etc/varnish<div><br></div><div><ol style="color:rgb(172,172,172);margin:0px;padding:0px 0px 0px 55px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;line-height:24px;background:rgb(247,247,247)"><li style="background:rgb(255,255,255)"><div style="padding:0px 8px;vertical-align:top;color:rgb(51,51,51);border-left-width:1px;border-left-style:solid;border-left-color:rgb(221,221,221);background:rgb(248,248,248)">backend default {</div></li><li style="background:rgb(255,255,255)"><div style="padding:0px 8px;vertical-align:top;color:rgb(51,51,51);border-left-width:1px;border-left-style:solid;border-left-color:rgb(221,221,221);background-image:initial;background-repeat:initial"> .host = "127.0.0.1";</div></li><li style="background:rgb(255,255,255)"><div style="padding:0px 8px;vertical-align:top;color:rgb(51,51,51);border-left-width:1px;border-left-style:solid;border-left-color:rgb(221,221,221);background-image:initial;background-repeat:initial"> .port = "8080";</div></li><li style="background:rgb(255,255,255)"><div style="padding:0px 8px;vertical-align:top;color:rgb(51,51,51);border-left-width:1px;border-left-style:solid;border-left-color:rgb(221,221,221);background-image:initial;background-repeat:initial">}</div></li></ol><div><br></div></div><div>Varnish Port 80 -> open port 80 on your firewall (Security Group AWS)</div><div>Backend Port 8080 -> no need to open port 8080 on your firewall (Security Group AWS)</div><div><br></div><div>So your /etc/sysconfig/varnish might look like:</div><div><br></div><div><div>DAEMON_OPTS="<span style="font-size:12.8px">-a :80 \</span></div><div> -f /etc/varnish/default.vcl \</div><div> <span style="font-size:12.8px"> T localhost:6082 \</span></div><div> -S /etc/varnish/secret \</div><span class=""><div> <span style="font-size:12.8px">-u varnish -g varnish \</span></div><div> -s <span style="font-size:12.8px">file,/var/lib/varnish/varnish_</span><span style="font-size:12.8px">storage.bin,1G"</span><br></div></span></div><div><br></div><div>hint: with defining the backend in your config you do not need to specify this in your daemon_opts.</div><div><br></div><div>If you type /etc/init.d/varnish restart and you get <span style="font-size:12.8px">Stopping Varnish Cache: [FAILED] this might be because your varnish daemon is not alive and cant be stopped :)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">You should also read <a href="http://book.varnish-software.com/4.0/" target="_blank">http://book.varnish-software.com/4.0/</a></span></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-02-15 11:05 GMT+01:00 Mike Jones <span dir="ltr"><<a href="mailto:michaeljones401@gmail.com" target="_blank">michaeljones401@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The output of <span style="font-family:'Courier New';font-size:12.8px">‘bash -x /etc/init.d/varnish start’ is </span><font face="Courier New"><span style="font-size:12.8px"><a href="http://pastebin.com/YiqFDgYJ" target="_blank">http://pastebin.com/YiqFDgYJ</a></span></font><div><font face="Courier New"><span style="font-size:12.8px"><br></span></font></div><div><font face="Courier New"><span style="font-size:12.8px">vcl config from '/etc/varnish/default.vcl' is <a href="http://pastebin.com/wEideMfC" target="_blank">http://pastebin.com/wEideMfC</a></span></font></div><div><font face="Courier New"><span style="font-size:12.8px"><br></span></font></div><div><font face="Courier New"><span style="font-size:12.8px">Output of '</span></font><span style="font-size:12.8px">netstat -tulpn and iptables -vnL' is <a href="http://pastebin.com/n5TYJVH5" target="_blank">http://pastebin.com/n5TYJVH5</a></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks</span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 13, 2016 at 7:33 PM, Tobias Honacker <span dir="ltr"><<a href="mailto:t.honacker@googlemail.com" target="_blank">t.honacker@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>please send the vcl config and the output of netstat -tulpn and iptables -vnL</div><div><br></div><div><br></div><div>greetings</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-13 17:56 GMT+01:00 Mike Jones <span dir="ltr"><<a href="mailto:michaeljones401@gmail.com" target="_blank">michaeljones401@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have a 'WordPress basic single instance' from <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html" target="_blank">http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-west-1.html</a><div><br></div><div>and my varnish file, located in /etc/sysconfig/varnish, looks like</div><div><br></div><div><a href="http://pastebin.com/hZNr6Apc" target="_blank">http://pastebin.com/hZNr6Apc</a><br></div><div><br></div><div>While my httpd conf file, /etc/httpd/conf/httpd.conf, looks like </div><div><br></div><div><a href="http://pastebin.com/xeZs8KQq" target="_blank">http://pastebin.com/xeZs8KQq</a><br></div><div><br></div><div>Running varnishstat looks like it's running but when visiting the webserver through the browser the page fails to load.</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 13, 2016 at 4:15 PM, Brad Tarver <span dir="ltr"><<a href="mailto:idle@pobox.com" target="_blank">idle@pobox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">6082 is the admin port<br>
<br>
This is my config on ubuntu: <a href="http://pastebin.com/E3tQ1eC1" target="_blank">http://pastebin.com/E3tQ1eC1</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<div>-- <br><small style="color:rgb(136,136,136);font-style:italic"><small>Brad Tarver</small></small><br>
</div>
<br>
<br>
<span>Mike Jones wrote:</span><br>
<blockquote type="cite"><div><div>
<div dir="ltr">Yes, I was talking about the security group, I did open
that but it didn't make any difference.<div><br></div><div>With the
settings previously mentioned I tried running curl on port 80 on I get</div><div><br></div><div>curl:
(7) Failed to connect to localhost port 80: Connection refused.</div><div><br></div><div>On
port 8080 I get the default apache page, but adding a directory after
the port 'curl <a href="http://127.0.0.1:8080/wordpress" target="_blank">127.0.0.1:8080/wordpress</a>' I
get an error saying the page has moved.</div><div><br></div><div>On port
6082 I get 'Authentication required'</div><div><br></div></div>
<div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 13,
2016 at 1:41 PM, Lee Trout <span dir="ltr"><<a href="mailto:lee@leetrout.com" target="_blank">lee@leetrout.com</a>></span>
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><font size="2"><span style="background-color:rgba(255,255,255,0)">> Do I
need to open port 8080 too?</span></font><div><font size="2"><span><br></span></font></div></span><div><font size="2"><span>Open it where? In a security group? You should make sure
you have port 80 open in your security group but that won't affect
local host. </span></font></div><div><font size="2"><span><br></span></font></div><div><font size="2"><span>You should try curling against the interfaces on the box
from the box itself and make sure it's actually sending info back
locally. With your config I believe you should be able to curl local
host on port 80 as well since you only specified a listening port. <span></span><br></span></font><div><div><br>On Saturday, February 13, 2016, Mike Jones <<a href="mailto:michaeljones401@gmail.com" target="_blank">michaeljones401@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I
have a single ec2 instance running and would like to install and
configure Varnish for that aws instance</div><div><br></div><div>I've
changed the default settings for varnish - /etc/sysconfig/varnish</div><div><br></div><div>DAEMON_OPTS="-a
:80 \</div><div> -T localhost:6082 \</div><div>
-b localhost:8080 \</div><div> -u varnish -g varnish \</div><div>
-s file,/var/lib/varnish/varnish_storage.bin,1G"</div><div><br></div><div>and
configured httpd - /etc/httpd/conf/httpd.conf to listen on port 8080</div><div><br></div><div>But
when I restart both services, the webpage fails to load.</div><div><br></div><div>There's
nothing in the error_log and when I tail -f the access_log nothing is
logged when I refresh the page.</div><div>Do I need to open port 8080
too?</div><div><br></div><div>Are there any guides on how to configure
Varnish for an aws instance?</div><div><br></div><div>Thanks</div></div></blockquote></div></div></div><span><font color="#888888"><br><br>-- <br>Sorry I fat thumbed
this on an iPhone <br>
</font></span></blockquote></div><br></div>
</div></div><pre>_______________________________________________
varnish-misc mailing list
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a></pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>