Skip to content

Instantly share code, notes, and snippets.

@tksugimoto
Last active April 25, 2019 15:37
Show Gist options
  • Save tksugimoto/12cf9949dcd89471ad952542458aa2d1 to your computer and use it in GitHub Desktop.
Save tksugimoto/12cf9949dcd89471ad952542458aa2d1 to your computer and use it in GitHub Desktop.
HAProxyで静的コンテンツ配信
HTTP/1.0 200 OK
Cache-Control: no-cache
Connection: close
Content-Type: text/plain
test
version: '3'
services:
haproxy:
build:
context: ./
ports:
- "${HAPROXY_BIND_IP_PORT:-127.0.0.1:8080}:80"
FROM haproxy:1.9-alpine
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
COPY 200-test.http /etc/haproxy/errors/200-test.http
frontend http-in
bind *:80
default_backend static-file
backend static-file
mode http
errorfile 503 /etc/haproxy/errors/200-test.http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment