proxy_cache_path /webc/site_deployments/<REDACTED>/cache levels=1:2 use_temp_path=off keys_zone=<REDACTED>:10m max_size=1g inactive=7d;

server {
	listen 10.20.61.11:80;
	server_name <REDACTED> www.<REDACTED>;

	access_log /webc/site_deployments/<REDACTED>/log/access.log main;
	error_log /webc/site_deployments/<REDACTED>/log/error.log;

	return 301 https://<REDACTED>$request_uri;
}

server {
	listen 10.20.61.11:443 ssl http2;
	server_name www.<REDACTED>;

	more_set_headers "Strict-Transport-Security: max-age=31536000";

	ssl_certificate /etc/letsencrypt/live/<REDACTED>/fullchain.pem;
	ssl_certificate_key /etc/letsencrypt/live/<REDACTED>/privkey.pem;

	access_log /webc/site_deployments/<REDACTED>/log/access.log main;
	error_log /webc/site_deployments/<REDACTED>/log/error.log;

	return 301 https://<REDACTED>$request_uri;
}

server {
	listen 10.20.61.11:443 ssl http2;
	server_name <REDACTED>;

	more_set_headers "Strict-Transport-Security: max-age=31536000";

	ssl_certificate /etc/letsencrypt/live/<REDACTED>/fullchain.pem;
	ssl_certificate_key /etc/letsencrypt/live/<REDACTED>/privkey.pem;

	access_log /webc/site_deployments/<REDACTED>/log/access.log main;
	error_log /webc/site_deployments/<REDACTED>/log/error.log;

	include /etc/nginx/error_pages;

	location / {
		proxy_pass https://10.20.61.10;

		proxy_set_header Host <REDACTED>;

		proxy_set_header X-Forwarded-Host $http_host;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Forwarded-Server $server_name;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

		proxy_cache <REDACTED>;
		proxy_cache_valid 200 10m;
		proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
		proxy_cache_background_update on;
		proxy_ignore_headers Cache-Control Expires X-Accel-Redirect X-Accel-Limit-Rate X-Accel-Buffering X-Accel-Charset;

		proxy_cache_bypass $cookie_nocache $arg_nocache;

		more_set_headers "X-Cache-Status: $upstream_cache_status";

		location ~ ^/((en|de|it)/)?admin {
			proxy_pass https://10.20.61.10;

			proxy_cache off;

			if ($cookie_nocache != true) {
				more_set_headers "Set-Cookie: nocache=true;Path=/";
			}
		}
	}
}
