Commit 80ead544 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Adjust nginx's error configuration

parent 4e022f81
Loading
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
# vim:ft=nginx

fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=ERR:1m inactive=1d;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

map $http_x_forwarded_proto $forwarded_https {
	default off;
	https on;
}

fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=ERR:1m inactive=1d;
fastcgi_cache_key "$scheme$request_method$host$request_uri";

server {
	listen 80;
	server_name _;
@@ -23,20 +23,20 @@ server {
	# Add Cache-Control headers for static files, removed in *.php location
	add_header Cache-Control "public, max-age=7776000, stale-while-revalidate=86400, stale-if-error=604800";

	error_page 404 /errors/404;
	error_page 404 @not-found;
	error_page 502 /errors/502.html;

	location /errors {
		internal;
		alias /etc/nginx/html;
	}

		location /errors/404 {
	location @not-found {
		include fastcgi.conf;
		fastcgi_param SCRIPT_FILENAME /app/index.php;
		fastcgi_cache ERR;
		fastcgi_cache_valid 404 1d;
	}
	}

	location @index {
		include fastcgi.conf;