-
Notifications
You must be signed in to change notification settings - Fork 616
Quickstart
This is how you use fabio in your setup:
-
Register your service in consul
-
Register a health check in consul as described here. Make sure the health check is passing since fabio will only watch services which have a passing health check.
-
Register one
urlprefix-
tag perhost/path
prefix it serves, e.g.:urlprefix-/css
urlprefix-i.com/static
urlprefix-mysite.com/
Make sure the prefix contains at least one slash (
/
) -
Start fabio without a config file (assuming a running consul agent on
localhost:8500
) Watch the log output how fabio picks up the route to your service. Try starting/stopping your service to see how the routing table changes instantly. -
Send all your HTTP traffic to fabio on port
9999
-
Done
To start a sample server to test the routing run the demo/server
like this:
./server -addr 127.0.0.1:5000 -name svc-a -prefix /foo
and access the server direct and via fabio
curl 127.0.0.1:5000/foo # direct
curl 127.0.0.1:9999/foo # via fabio
If you want fabio to handle SSL as well set the proxy.addr
along with the
public/private key files in
fabio.properties
and run fabio -cfg fabio.properties
. You might also want to set the
proxy.header.clientip
, proxy.header.tls
and proxy.header.tls.value
options.
Check the Debugging section to see how to test fabio with curl
.
- Home
- Quickstart
- Installation
- Verifying Releases
- Configuration
- Binding to low ports
- Deployment
-
Features
- Access Logging ⭐️
- Certificate Stores
- Compression
- Circonus Support
- DataDog Support
- Docker Support
- Dynamic Reloading
- Graceful Shutdown
- Graphite Support
- HTTP Header
- HTTPS Upstream
- Metrics Support
- Path Stripping
- PROXY Protocol
- Request Debugging
- Request Tracing
- SSE Support
- StatsD Support
- TCP Proxy ⭐️
- TCP+SNI Support
- Traffic Shaping
- Vault Integration
- Websockets
- Web UI
- Performance
- Service Configuration
- Routing
- Debugging
- Contributing
- Why fabio?