How to setup and check turpentine varnish cache for Magento? - magento

I have setup extension Turpentine - Varnish cache on my local server. I have also install varnish on local server by terminal.
In admin panel system->configuration->Turpentine under varnish option and cache there are some options such as Server List,Backend Host,Backend Port,
I have checked it with my local sever details but it is not working. How can I setup & check it properly? and which credentials should I use for these fields?And also How can I check if cache is generating or not.
Thanks in advance.

Related

suspend and unsuspend don't want to cache in cPanel

I used varnish cache in backend server with cPanel, I want suspend and unsuspend requests in WHM be done in a moment and suspend or unsuspend requests (and page) Don't cache...
What setting should be made on the varnish side?
You should add custom script in /scripts in WHM server...

Varnish ignoring settings and not showing hits or misses

I've spun up a new Amazon Linux AMI EC2 instance and installed varnish on top of it via the following process:
Installed varnish with sudo yum install varnish and set it to run on startup
Setup /etc/sysconfig/varnish to point varnish to listen to port 80
Added a off the shelf WordPress /etc/varnish/defualt.vcl from this repo
Modified /etc/httpd/conf/httpd.conf to have apache look at port 8080
Restarted httpd and varnish
When running /usr/sbin/varnishd -V I get the following: varnishd (varnish-3.0.7 revision f544cd8)
And it works. Kind of. It seems to be having the following issues:
When up and running, if I hit a page it will load fully, then serve the varnish cached page as expected, headers all setup correctly. However the cache will die after 120 seconds, not the time set in the default.vcl file. However if I make a deliberate error in the default.vcl file, varnish will not start.
When using varnishstat, varnishtop or varnishsizes nothing shows up. I get the default screen for each process but no hits or misses or sizes show up at all.
Varnish does not seem to want to run properly on startup and after being left ticking over with no access to the server for a week varnish seems to have stopped working. Along with this when running service varnish restart Stopping the cache always fails.
/etc/sysconfig/varnish https://pastebin.com/UmamLFMG
/etc/varnish/default/vcl https://pastebin.com/C3JdkuUe
/etc/https/conf/httpd.conf https://pastebin.com/TzvDVhkq

Enable page caching on Nginx

I have a CDN for my website that uses Nginx and Drupal.
In my nginx configuration, I am trying to enable page level caching so requests like "website.com/page1" can be served from the CDN. Currently, I am only able to serve static files from the CDN(GET requests on 'website.com/sites/default/files/abc.png').
All page-level requests always hit the back-end web server.
What nginx config should I add in order for "website.com/page1" requests to also be served from the CDN?
Thanks!
If I understand you correctly, you want to setup another Nginx so that it works as a basic CDN in front of your current webserver (Nginx or Apache??) on which Drupal resides. You need to have a reverse proxy Nginx server to cache both static assets and pages. Since its not super clear to me what you wrote, this is what I assumed.
If you want a setup like this, then you should read the following article on how to setup reverse proxy

how to redirect my domain to my magento's index.php?

I have a godaddy domain www.example.com. And i have forwarded it to my aws(amazon web services) elastic IP. But my domain is getting forwarded to bitnami's congratulation page instead of my magento application. I want to redirect my domain to magento's application instead of bitnami's congratulations page. Please help me out.
You'll probably find that the default Bitnami Apache configuration is forcefully rewriting all requests to the welcome page. Bitnami AMI's are designed in a way that you need to set up your application using their tools/web interface, which are then exposed at a specific URL context (i.e. http://domain.com/myapp/)
If you want to get around this, you can try modifying the files in the Apache config directory (/etc/httpd/conf.d/*), or use an AMI that isn't preconfigured with that toolset such as Amazon Linux or Ubuntu.

Configure varnish on a different server

This is my situation,
I have 2 dedicated servers, one with a Magento installation, and the other without anything.
I would like to use the second server with most of it's RAM with Varnish.
I can't find around an example on how to make Varnish work alone on one server and manage the requests vs the mysite.com on the first server.
Is this possible or Varnish must work on same server?
It's completely possible to have Varnish on seperate server.
You can specify IP address & port in below code where your Magento Web Server resides
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "6081";
}

Resources