1
votes

I have configured Varnish on Ubuntu 16.04. I have the backeend servers configured and vcl_recv sections. Varnish is configured on Port 80 and the IIS web-servers are also operating on port 80. How do I get the Varnish server to start caching the IIS web-servers. The IIS web-servers are also running Drupal 7 and 8. I have read documentation about using Apache and port 8080 but that isn't my situation. I am not sure how to integrate the caching with the Windows IIS web-servers. My boss has asked ask me to get this working. I know there is a caching ability on IIS but they want to use Varnish. So any help would be greatly appreciated.

2

2 Answers

0
votes

From what I understand your varnish and iis are not on the same servers (one linux and one windows).

It should be pretty straightforward to set up. Declare your iis servers in the vcl backend section (ip and port 80) and follow the documentation, just keep in mind that your varnish server is not the same as your backend server (iis in your case, apache in the docs).

As for the cache it will depend on your needs. You need to tell varnish what yo cache and how long to cache it. you can do it in different ways (returning a cache control header in your iis web response, hardcode the cache time in varnish...).

0
votes

They can't share port (if on the same host). Otherwise it's perfectly fine to have Varnish running on "host1" on port 80 and IIS on "host2" on port 80.

If on the same host:

Either you have to change IIS to work on port 8080 or you have to change Varnish to work on port 8080 and then redirect your incoming traffic to that port.