I ınstalled Nexcess Turpentine Varnish Cache extension and installed varnish 3. to my server. Configured files to listen port 8080. This is my Tcp check:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5223/varnishd tcp 0 0 :::80 :::* LISTEN 5223/varnishd
No httpd appears as you see.
I changed default port of apache to 8080 via Cpanel>Tweak Settings.
My problem is when i try to type my address bar "solempet.com" and click enter it appears as "Default Website Page"
But when i try to type my address bar "www.solempet.com" or https://solempet.com my site loads perfectly.
It's a fresh magento installation and i setted "use secure urls" beginning at the magento installation. Here is some screenshots about my configuration of varnish and httpd.conf;
Virtualhosts Htpd.conf Listen Ports
Varnish default.vcl enter image description here
Problem page
2 Answers 2
this issue is 100 years old...
first of all you need to use Turpentine vcl file, after you go to Cache Management, click save Varnish Config, will be located in
/home/solempet/public_html/var/default.vcl
to make it more easier for you, you can symlink it:
cd /etc/varnish
rm default.vcl
ln -s /home/solempet/public_html/var/default.vcl ./default.vcl
second part, is that your backend IP address must be the same as per cPanel account configuration. configure it in Turpentine settings, in magento admin.
your Varnish startup config file:
/etc/sysconfig/varnish
DAEMON_OPTS="-a :80 \
-T 127.0.0.1:6082 \
-f /etc/varnish/default.vcl \
-u varnish -g varnish \
-p thread_pool_min=200 \
-p thread_pool_max=4000 \
-p thread_pool_add_delay=2 \
-p cli_timeout=25 \
-p cli_buffer=26384 \
-p esi_syntax=0x2 \
-p session_linger=100 \
-S /etc/varnish/secret \
-s malloc,3G"
-
But it isn't solve my other problem. Thing is i cant go my magento by typing "solempet.com" it appears cpanel's default web site page. Failed to apply the VCL to 127.0.0.1:8080: Varnish admin socket timeoutSolemtech– Solemtech2015年02月14日 14:58:02 +00:00Commented Feb 14, 2015 at 14:58
-
your Varnish admin interface must be on 127.0.0.1:6082, and dont forget to clear your browsers cache, because cpanel error page is cached...user2857– user28572015年02月14日 15:31:51 +00:00Commented Feb 14, 2015 at 15:31
-
Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from Varnish: 107 tmuqqtieexdjykrimbrkwfeambmxjmnc Authentication required. Now i got this. Im completely lost here. So sorry.Solemtech– Solemtech2015年02月14日 15:39:31 +00:00Commented Feb 14, 2015 at 15:39
-
1You may need to add a \n to the end of your secret key as stored in Magento admin. This worked for meBarry Carlyon– Barry Carlyon2015年04月21日 16:17:38 +00:00Commented Apr 21, 2015 at 16:17
-
1Error determining Varnish version: Got unexpected response code from Varnish: 500 I am not able to save varnish config.Yogesh Trivedi– Yogesh Trivedi2016年08月16日 13:32:55 +00:00Commented Aug 16, 2016 at 13:32
If its dedicated server then you wont need to host on the real IP
I assume that varnish is installed on 127.0.0.1
So just change <Virtual host> entry from real ip to local server 127.0.0.1
Change
<VirtualHost 185.22.187.220:8080>
to
<VirtualHost 127.0.0.1:8080>
If its not working then run netstat -tulpn and let me know the results so I can look more into it.
Restart the server... in my case i am using Nginx, and question asked in this thread is for Apache so i have posted answer for Apache only.