Thijs Feryn is a "technical evangelist" at Varnish Software, the company behind the Varnish Cache open source technology. His goal is to bring technology to the people and people to technology. He focuses on bridging the gap between code and infrastructure. Thijs is a published author with O'Reilly and with Vulkan, he is also involved in many open source communities. He speaks, listens, writes, codes, teaches, blogs, vlogs, organizes and is above all very excited to speak at "your event name"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//An ESI service provider that defines a custom @esi(/header) directive that can be used to render ESI tags | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Support\Facades\Blade; | |
class EsiServiceProvider extends ServiceProvider | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.1; | |
import std; | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
# Add hostnames, IP addresses and subnets that are allowed to purge content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.0; | |
import std; | |
sub vcl_recv { | |
if (!req.http.X-Forwarded-Proto) { | |
if(std.port(server.ip) == 443) { | |
set req.http.X-Forwarded-Proto = "https"; | |
} else { | |
set req.http.X-Forwarded-Proto = "http"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.0; | |
import std; | |
backend default { | |
.host = "localhost"; | |
.port = "8080"; | |
.first_byte_timeout = 600s; | |
.probe = { | |
.url = "/health_check.php"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.0; | |
import std; | |
import var; | |
import cookie; | |
import digest; | |
acl internal { | |
"192.168.20.0"/24; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetEnvIf X-Forwarded-Proto "https" HTTPS=on | |
Header append Vary: X-Forwarded-Proto | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC] | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vcl 4.1; | |
backend default none; | |
sub vcl_recv { | |
return(synth(200,"OK")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Varnish Cache Plus, a high-performance HTTP accelerator | |
After=network-online.target | |
[Service] | |
Type=forking | |
KillMode=process | |
# Maximum number of open files (for ulimit -n) | |
LimitNOFILE=131072 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
echo-server: | |
image: "jmalloc/echo-server:latest" | |
container_name: origin | |
hostname: origin | |
ports: | |
- "8080:8080" | |
varnish: | |
image: "varnish:latest" |
NewerOlder