5f0eb86bed
I've combined the core nginx.conf with the proxy config, which all goes into /etc/nginx/nginx.conf. I've made a number of changes: * Nginx now proxies both SQL API and Windshaft requests through Varnish. * Nginx adds a custom HTTP header, X-Carto-Service, so that Varnish can differentiate between backends (since it can't do so based on incoming port). * I've modified the primary Nginx log format to include more information on how requests are being proxied--you can now see the upstream address for proxied requests. * I've added the `proxy_no_cache` and `proxy_cache_bypass` directives to the Windshaft and SQL API proxy sections. Without those directives, Nginx may attempt to act as a cache, returning 304 Not Modified for resources that more accurately should be cached by Varnish (whose cache is invalidated via a Postgres trigger for updated metadata). |
||
---|---|---|
.. | ||
app_config.yml | ||
CartoDB-dev.js | ||
cartodb.nginx.proxy.conf | ||
database.yml | ||
varnish.vcl | ||
WS-dev.js |