From cf85d66b2f59412fb01f2601685669138656278a Mon Sep 17 00:00:00 2001 From: Torstein Eide <1884894+Eideen@users.noreply.github.com> Date: Fri, 12 Jan 2024 14:26:32 +0100 Subject: [PATCH 1/7] Add example for HAproxy --- readme.md | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/readme.md b/readme.md index a3b84f00..4c8bd5d7 100644 --- a/readme.md +++ b/readme.md @@ -241,6 +241,93 @@ subdomain.domain.com { reverse_proxy : } ``` +### HAproxy + +Bellow is a geneic HAproxy config, using `audiobookshelf.YOUR_DOMAIN.COM`. + +To use `http2`, `ssl` is needed. + +````make +global + # ... (your global settings go here) + +defaults + mode http + # ... (your default settings go here) + +frontend my_frontend + # Bind to port 443, enable SSL, and specify the certificate list file + bind :443 name :443 ssl crt-list /path/to/cert.crt_list alpn h2,http/1.1 + mode http + + # Define an ACL for subdomains starting with "audiobookshelf" + acl is_audiobookshelf hdr_beg(host) -i audiobookshelf + + # Use the ACL to route traffic to audiobookshelf_backend if the condition is met, + # otherwise, use the default_backend + use_backend audiobookshelf_backend if is_audiobookshelf + default_backend default_backend + +backend audiobookshelf_backend + mode http + # ... (backend settings for audiobookshelf go here) + + # Define the server for the audiobookshelf backend + server audiobookshelf_server 127.0.0.99:13378 + +backend default_backend + mode http + # ... (default backend settings go here) + + # Define the server for the default backend + server default_server 127.0.0.123:8081 + +```` + +#### PFsense and HAproxy + +For PFsense the inputs are more graficals + +##### Frontend, Default backend, access control lists and actions + +###### Access Control lists + +| Name | Expression | CS | Not | Value | +|:--------------:|:-----------------:|:--:|:---:|:---------------:| +| audiobookshelf | Host starts with: | | | audiobookshelf. | + + + +###### Actions + +The `condition acl names` needs to match the name above `audiobookshelf`. + +| Action | Parameters | Condition acl names | Backend | +|:--------------:|:-----------------:|:---------------:|:---------------:| +| audiobookshelf | Host starts with: | audiobookshelf. | audiobookshelf| + +##### Backend + + +The `Name` needs to match the `Backend` above `audiobookshelf`. + +| Name | audiobookshelf | +|--------------|-----------------| + +**Server list:** + +| Name | Expression | CS | Not | Value | +|:--------------:|:-----------------:|:--:|:---:|:---------------:| +| audiobookshelf | Host starts with: | | | audiobookshelf. | + +##### Health checking + +Health checking is enabled by default. `Http check method` of `OPTIONS` is not supported on Audiobookshelf. +If Health check fails, data will not be forwared. +Need to one of following: + +* Change `Health check method` to `none`. To disable. +* Change `Http check method` to `HEAD` or `GET`. To make Health checking function. # Run from source From 6ca684603c6c1a1b0737b62e1663913e7a74a555 Mon Sep 17 00:00:00 2001 From: Torstein Eide <1884894+Eideen@users.noreply.github.com> Date: Fri, 12 Jan 2024 14:35:30 +0100 Subject: [PATCH 2/7] Fix typos --- readme.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/readme.md b/readme.md index 4c8bd5d7..86fa46f0 100644 --- a/readme.md +++ b/readme.md @@ -284,13 +284,13 @@ backend default_backend ```` -#### PFsense and HAproxy +### PFsense and HAproxy -For PFsense the inputs are more graficals +For PFsense the inputs are graphical, and `Health checking` is enabled. -##### Frontend, Default backend, access control lists and actions +#### Frontend, Default backend, access control lists and actions -###### Access Control lists +##### Access Control lists | Name | Expression | CS | Not | Value | |:--------------:|:-----------------:|:--:|:---:|:---------------:| @@ -298,29 +298,29 @@ For PFsense the inputs are more graficals -###### Actions +##### Actions The `condition acl names` needs to match the name above `audiobookshelf`. -| Action | Parameters | Condition acl names | Backend | -|:--------------:|:-----------------:|:---------------:|:---------------:| -| audiobookshelf | Host starts with: | audiobookshelf. | audiobookshelf| +| Action | Parameters | Condition acl names | +|:--------------:|:-----------------:|:---------------:| +| `Use Backend` |audiobookshelf | audiobookshelf | -##### Backend +#### Backend -The `Name` needs to match the `Backend` above `audiobookshelf`. +The `Name` needs to match the `Parameters` above `audiobookshelf`. | Name | audiobookshelf | |--------------|-----------------| -**Server list:** +##### Server list: | Name | Expression | CS | Not | Value | |:--------------:|:-----------------:|:--:|:---:|:---------------:| | audiobookshelf | Host starts with: | | | audiobookshelf. | -##### Health checking +##### Health checking: Health checking is enabled by default. `Http check method` of `OPTIONS` is not supported on Audiobookshelf. If Health check fails, data will not be forwared. From 0153c0faaee979a1790e910511f4671044d26a0d Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 24 Jan 2024 16:54:54 -0600 Subject: [PATCH 3/7] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 86fa46f0..19507e9e 100644 --- a/readme.md +++ b/readme.md @@ -243,7 +243,7 @@ subdomain.domain.com { ``` ### HAproxy -Bellow is a geneic HAproxy config, using `audiobookshelf.YOUR_DOMAIN.COM`. +Below is a generic HAProxy config, using `audiobookshelf.YOUR_DOMAIN.COM`. To use `http2`, `ssl` is needed. From e682213681bda3921a17b4ae54c174bc0771c129 Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 24 Jan 2024 16:55:06 -0600 Subject: [PATCH 4/7] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 19507e9e..83482b23 100644 --- a/readme.md +++ b/readme.md @@ -241,7 +241,7 @@ subdomain.domain.com { reverse_proxy : } ``` -### HAproxy +### HAProxy Below is a generic HAProxy config, using `audiobookshelf.YOUR_DOMAIN.COM`. From bbc1d20396a3d02b2edd498fa97492019ed72ad4 Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 24 Jan 2024 16:55:12 -0600 Subject: [PATCH 5/7] Update readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 83482b23..1af28065 100644 --- a/readme.md +++ b/readme.md @@ -284,9 +284,9 @@ backend default_backend ```` -### PFsense and HAproxy +### pfSense and HAProxy -For PFsense the inputs are graphical, and `Health checking` is enabled. +For pfSense the inputs are graphical, and `Health checking` is enabled. #### Frontend, Default backend, access control lists and actions From dcec2154c01e0094c1bba5e61619d2a37aa32a8a Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 24 Jan 2024 16:55:17 -0600 Subject: [PATCH 6/7] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 1af28065..3ee435dc 100644 --- a/readme.md +++ b/readme.md @@ -324,7 +324,7 @@ The `Name` needs to match the `Parameters` above `audiobookshelf`. Health checking is enabled by default. `Http check method` of `OPTIONS` is not supported on Audiobookshelf. If Health check fails, data will not be forwared. -Need to one of following: +Need to do one of following: * Change `Health check method` to `none`. To disable. * Change `Http check method` to `HEAD` or `GET`. To make Health checking function. From 02aabb8f977a4bfd954d1c1b4a4e4798236bbf47 Mon Sep 17 00:00:00 2001 From: advplyr Date: Wed, 24 Jan 2024 16:55:21 -0600 Subject: [PATCH 7/7] Update readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 3ee435dc..0c3651dd 100644 --- a/readme.md +++ b/readme.md @@ -326,8 +326,8 @@ Health checking is enabled by default. `Http check method` of `OPTIONS` is not s If Health check fails, data will not be forwared. Need to do one of following: -* Change `Health check method` to `none`. To disable. -* Change `Http check method` to `HEAD` or `GET`. To make Health checking function. +* To disable: Change `Health check method` to `none`. +* To make Health checking function: Change `Http check method` to `HEAD` or `GET`. # Run from source