0
votes

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!

1

1 Answers

0
votes

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