Control Web Panel
WebPanel => Apache => Varnish => Topic started by: Administrator on May 18, 2014, 11:30:07 PM
-
This is very simple tutorial how to use and install Varnish Cache Server on CentOS using CWP panel.
1. In your CWP menu find Varnish
2. Click on install
3. Setup Config
Default config to use/enable Varnish Cache Server is:
Apache IP: (Your Shared IP, or 127.0.0.1)
Apache port: 82
Varnish IP: (default all, if you need to change than edit config files manually)
Varnish Port: 80
If you are getting default CWP page on your domain index then you can try setting your shared ip to 127.0.0.1
How to check if Varnish Cache Server Works?
- Using CURL command "curl -i SERVER-IP" you will get headers and on beginning of the output try finding "X-Varnish"
- Using this website "http://www.whatismyip.com/server-headers-check/ (http://www.whatismyip.com/server-headers-check/)" in Response find "X-Varnish"
Default config to disable Varnish Cache and use Apache only is:
Apache IP: (Your Shared IP)
Apache port: 80
Varnish IP: (default all, if you need to change than edit config files manually)
Varnish Port: 6081
-
thanks.
but varnish is not start next restart.
don't forgat add to varnish on startup.
chkconfig --levels 235 varnish on
-
Thanks for your tip carmageddon63
-
thanks.
but varnish is not start next restart.
don't forgat add to varnish on startup.
chkconfig --levels 235 varnish on
Thanks!
-
Hi there
I currently have my shared ip setup to 127.0.0.1 as per a post i found on the forum in order to resolve an issue whereby all my sites would go to the default index page , however with the new functionality in CWP if i suspend a site it redirects me to 127.0.0.1 does anyone know a work around or better yet how to use my live ip address ?
-
suspend account redirect is set on the shared server ip address.
-
I am getting a 503 error after installing varnish :( anybody with the same problem?
-
How to disable or remove varnish? I using CWM in my VPS host.
when i want to delete the yum yum remove varnish not work.
(http://s17.postimg.org/lir08tkpr/Remove_Vanish.png)
why I want to delete? because it does not work on my VPS :-[
please help me...
-
You can disable it. See the instructions in the first post.
-
Isn't there any way in which we can set the Apache IP address to my server's public IP and all the websites hosted in my server works? Setting the Apache IP to 127.0.0.1 is making my mailing function not working and also all the visitors of my website are known as visited from 127.0.0.1 Varnish should work correctly with my server's public IP set in the Apache's IP...
-
you have in the first post that you can use the shared server IP.
-
you have in the first post that you can use the shared server IP.
Hello sir, I'm facing the same problem
When running Varnish (port 80, with apache set at at port 82) with 127.0.0.1 as shared ip, it works.
however, when i set my default shared ip (the server public ip) any domain will show the server default page.
For a number of reasons I need my server ip as the default shared ip.
how can this be solved?
thank you.
-
new version has multi ip varnish configuration with virtual hosts so you can try it.
-
ok, varnish is running properly now (at least so it seems..)
what i did is:
in CentOS Web Panel Settings --> Edit setting, I did set my IP
in Varnish Settings i did set port 82 for Apache, My server IP for Apache IP, and port 80 for Varnish, leaving the rest as default.
That way it worked with Varnish and my IP (not 127.0.0.1)
I don't know if this configuration will, creating other problems along, but for the moment Varnish is working, with my server IP.
Hope it can help someone.
-
info is added on the wiki
http://wiki.centos-webpanel.com/how-to-install-varnish
-
Nice i will try it.
-
I do not see Varnish anyplace on CWP. I am running CWPpro version: 0.9.8.238
Why dont I have it ?
-
its under WebServers in left menu
-
Doing that way Admin, it doesn't work, when I click after on Varnish Conf (under apache>webservers tab), it is said that it is not installed :/
-
More generally, there's such bugs if I want to activate Apache+Nginx+Varnish...same issue with Apache+Nginx...I think I will remove that CWP and try Webmin instead, I lose time with this CWP :/
-
hello, my server only have port 80 and 443 opend. All the rest are close, my server is Apache & Varnish Cache & Nginx Reverse Proxy.
So i need open port 82 and 8181?
Result https://www.whatismyip.com/server-headers-check
HTTP/1.1 200 OK
nginx/1.14.0
Mon, 16 Jul 2018 09:50:20 GMT
text/html; charset=utf-8
chunked
keep-alive
Accept-Encoding
200182
0
1.1 varnish (Varnish/5.2)
bytes
HIT from Backend
-
only ports 80 and 443 are needed others not for clients as they will only use those for http and https
-
Good thanks 8)
-
Can I use Varnish and Nginx both on CWP? I have a website on local that i want to move here but it is using both varnish cache (https://www.cloudways.com/blog/configure-varnish-cache/) and nginx. Both requires root access to install and configure.
-
am on rocky 8.10
how i fix this ? it still works but cfg not there like it was
(https://www.getsuperhost.com/Screenshot_14-2-2025_191022_.jpeg)
-
Do you have /usr/lib/systemd/system/varnish.service ?
-
Rocky use to have some missing packages for some reason.
As @overseer mentioned, do you have the vanish service?
And what is it's status?