Genaker / FastFPC

Magento 2 improved FPC and Varnish replacement was used for Magento SaaS solution when you need high performace and scaling. No more outdated Adobes official Varnish approach is requred
53 stars 11 forks source link

Fallback for uncached page #3

Open Genaker opened 1 year ago

Genaker commented 1 year ago

server { listen 80 default_server;

location / {

    if ($uri ~ "^/$") {
        rewrite / /404;
    }

    proxy_intercept_errors on;
    proxy_pass http://codes:80;

    error_page 403 404 503 = @outage;

    error_page 400 401 500 = @miss-php;
}

location @outage {
    rewrite ^ /200;
    proxy_pass http://codes:80;
}

location @miss-php {
    fastcgi_pass codes-php:9000;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME /var/www/html/index.php;
    fastcgi_param DOCUMENT_ROOT /var/www/html;
    internal;
}

}