New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Help me on varnish configuration
nehafarzana80
Member
in Help
Hello,
I have setup Varnish in front of nginx yesterday. I need to change something if someone can help me.
My VPS's IP is: xx.xx.xx.xx
Domain: MyDomain.com
When I enter IP on browser it opens my site, not the "welcome to nginx" page. Can anyone help me out fixing this problem?
Comments
Hi,
You should past your virtual host configuration here so we check what's going on
Did you set the server_name in the nginx config?
Im guessing your varnish isnt setup to forward the "Host" header and you have a default nginx vhost that responds with the "welcome to nginx" page.
This is my varnish configuration (default.vcl)
http://pastebin.com/aztGkBfG
And, my vhost.conf is; http://pastebin.com/MH0mX025
I think nothing wrong with vhost conf file as without varnish all was good. Just after activating varnish both IP and domain name opens the website.
Solved the problem by adding another fake domain.