1

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

asked Feb 14, 2015 at 13:12

2 Answers 2

3

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"
answered Feb 14, 2015 at 14:42
8
  • 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 timeout Commented 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... Commented 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. Commented Feb 14, 2015 at 15:39
  • 1
    You may need to add a \n to the end of your secret key as stored in Magento admin. This worked for me Commented Apr 21, 2015 at 16:17
  • 1
    Error determining Varnish version: Got unexpected response code from Varnish: 500 I am not able to save varnish config. Commented Aug 16, 2016 at 13:32
0

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.

answered Oct 13, 2016 at 13:35

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.