Skip to content

Commit 16f6f65

Browse files
authored
Merge pull request linkerd#39 from BuoyantIO/siggy/http-proxy
add simple http-proxy example
2 parents b14047f + 0421390 commit 16f6f65

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

http-proxy/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Example config for linkerd as an HTTP Proxy
2+
3+
For more information see our
4+
[HTTP Proxy documentation](https://linkerd.io/getting-started/http-proxy/).
5+
6+
## Setup webapp
7+
8+
```bash
9+
echo "Hello world" > hello; python3 -m http.server 8888
10+
```
11+
12+
## Setup linkerd
13+
14+
```bash
15+
curl -sLO https://github.com/BuoyantIO/linkerd/releases/download/0.8.2/linkerd-0.8.2-exec
16+
chmod +x linkerd-0.8.2-exec
17+
./linkerd-0.8.2-exec ./linkerd.yaml
18+
```
19+
20+
## Test
21+
22+
```bash
23+
$ http_proxy=localhost:4140 curl -s http://webapp/hello
24+
Hello world
25+
```

http-proxy/linkerd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
routers:
2+
- protocol: http
3+
baseDtab: /http/1.1/*/webapp => /$/inet/127.1/8888
4+
servers:
5+
- ip: 0.0.0.0
6+
port: 4140

0 commit comments

Comments
 (0)