Skip to content

alexander-rodin/varnish-nginx-app-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

varnish->nginx->app (example)

Example of using docker-compose to configure nginx (proxing an node.js app) behind varnish.

      +---------+      +---------+      +---------+
----->| varnish |----->|  ngix   |----->|   app   |
      +---------+      +---------+      +---------+

Usage

From the repo root, run:

docker-compose -p example up

To check the app running, run:

curl localhost:3000/some-path

To check the nginx proxing the app, run:

curl localhost:8080/some-path

To check the varnish on top of nginx, run:

curl localhost/some-path

All requets should return:

  <!DOCTYPE html>
  <html>
    <head>
      <title>App</title>
      <link rel="stylesheet" href="/stylesheets/main.css" />
    </head>
    <body>
      <p><strong>Request received for:</strong> /some-path</p>
    </body>
  </html>

About

Nginx (proxing an node.js app) behind varnish.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 47.5%
  • Dockerfile 38.9%
  • CSS 8.6%
  • VCL 5.0%