mirror of
https://git.madhouse-project.org/algernon/iocaine.git
synced 2025-02-08 18:56:18 +01:00
docs: Further updates & fixes to the nginx docs
Thanks to @redshiftltd for test driving the nginx setup, and providing very valuable feedback & the updated configurations. Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
parent
2050158c5a
commit
22166e0e7c
1 changed files with 3 additions and 1 deletions
|
@ -32,6 +32,8 @@ map $http_user_agent $badagent {
|
|||
}
|
||||
```
|
||||
|
||||
You can put this into a file common between all servers, like `/etc/nginx/conf.d/iocaine.conf`, because on many distributions, any `*.conf` file under `/etc/nginx/conf.d` will get automatically included. This way, you can share it between servers, without having to include it from multiple files manually.
|
||||
|
||||
Within the `server` block, we'll rewrite the URL if find a match on `$badagent`, and the proxy *that* location through to `iocaine`. The reason we need the `rewrite` is that `nginx` does not support `proxy_pass` within an `if` block. In the end, our `server` block will look like this:
|
||||
|
||||
|
||||
|
@ -43,7 +45,7 @@ server {
|
|||
}
|
||||
location /ai {
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass 127.0.0.1:42069;
|
||||
proxy_pass http://127.0.0.1:42069;
|
||||
}
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
|
|
Loading…
Reference in a new issue