Skip to content

Commit

Permalink
chore(docs): Add haproxy in the reverse-proxy section (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
RisedSky authored Aug 16, 2024
1 parent 6486db6 commit d56c19b
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions docs/getting-started/reverse-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,60 @@ https://example.com {
```

(by @ccallahan, [source](https://github.com/nurdism/neko/pull/125/commits/eb4ceda75423b0d960c8aea0240acf6d7a10fef4))

## HAProxy

Using your frontend section *(mine is called http-in)*, add the ACL to redirect correctly to your n.eko instance.

```sh
frontend http-in
#/********
#* NEKO *
acl neko_rule_http hdr(host) neko.domain.com # Adapt the domain
use_backend neko_srv if neko_rule_http
#********/


backend neko_srv
mode http
option httpchk
server neko 172.16.0.0:8080 # Adapt the IP
```
Then, restart the haproxy service.
```sh
service haproxy restart
```
### Having trouble reaching your HAProxy ?
Try theses solution :
- Verify the logs / what HAProxy is telling you :
> ```sh
> service haproxy status
> ```
- If the service is UP and the ACL rule + backend is OK then tail the log and keep them to verify :
> ```sh
> tail -f /var/log/haproxy.log
> # after that, go to your neko.instance.com and look for the logs in the shell
> ```
- Ensure you set the timeout to 60 seconds before the request fail.
> ```sh
> global
> stats timeout 60s
> ```
- Ensure you set the forwardfor and the timeout aswell in the defaults section.
> ```sh
> defaults
> option forwardfor
> timeout connect 30000
> timeout client 65000
> timeout server 65000
> ```
*(Don't forget to restart the service each time you modify the `.cfg` file !)*
(by @RisedSky)

0 comments on commit d56c19b

Please sign in to comment.