aboutsummaryrefslogtreecommitdiff
path: root/doc/book/cookbook
diff options
context:
space:
mode:
Diffstat (limited to 'doc/book/cookbook')
-rw-r--r--doc/book/cookbook/exposing-websites.md22
-rw-r--r--doc/book/cookbook/gateways.md3
-rw-r--r--doc/book/cookbook/recovering.md2
3 files changed, 21 insertions, 6 deletions
diff --git a/doc/book/cookbook/exposing-websites.md b/doc/book/cookbook/exposing-websites.md
index cc4ddfa3..be462dc9 100644
--- a/doc/book/cookbook/exposing-websites.md
+++ b/doc/book/cookbook/exposing-websites.md
@@ -3,7 +3,19 @@ title = "Exposing buckets as websites"
weight = 25
+++
-You can expose your bucket as a website with this simple command:
+## Configuring a bucket for website access
+
+There are two methods to expose buckets as website:
+
+1. using the PutBucketWebsite S3 API call, which is allowed for access keys that have the owner permission bit set
+
+2. from the Garage CLI, by an adminstrator of the cluster
+
+The `PutBucketWebsite` API endpoint [is documented](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html) in the official AWS docs.
+This endpoint can also be called [using `aws s3api`](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-website.html) on the command line.
+The website configuration supported by Garage is only a subset of the possibilities on Amazon S3: redirections are not supported, only the index document and error document can be specified.
+
+If you want to expose your bucket as a website from the CLI, use this simple command:
```bash
garage bucket website --allow my-website
@@ -11,10 +23,16 @@ garage bucket website --allow my-website
Now it will be **publicly** exposed on the web endpoint (by default listening on port 3902).
+## How exposed websites work
+
Our website serving logic is as follow:
+
- Supports only static websites (no support for PHP or other languages)
- Does not support directory listing
- - The index is defined in your `garage.toml`. ([ref](@/documentation/reference-manual/configuration.md#index))
+ - The index file is defined per-bucket and can be specified in the `PutBucketWebsite` call
+ or on the CLI using the `--index-document` parameter (default: `index.html`)
+ - A custom error document for 404 errors can be specified in the `PutBucketWebsite` call
+ or on the CLI using the `--error-document` parameter
Now we need to infer the URL of your website through your bucket name.
Let assume:
diff --git a/doc/book/cookbook/gateways.md b/doc/book/cookbook/gateways.md
index 0cec4c53..62ed0fe2 100644
--- a/doc/book/cookbook/gateways.md
+++ b/doc/book/cookbook/gateways.md
@@ -15,9 +15,6 @@ You can configure Garage as a gateway on all nodes that will consume your S3 API
- **It simplifies security.** Instead of having to maintain and renew a TLS certificate, you leverage the Secret Handshake protocol we use for our cluster. The S3 API protocol will be in plain text but limited to your local machine.
-## Limitations
-
-Currently it will not work with minio client. Follow issue [#64](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/64) for more information.
## Spawn a Gateway
diff --git a/doc/book/cookbook/recovering.md b/doc/book/cookbook/recovering.md
index d826ca6c..2424558c 100644
--- a/doc/book/cookbook/recovering.md
+++ b/doc/book/cookbook/recovering.md
@@ -94,7 +94,7 @@ might be faster but most of the pieces will be deleted anyway from the disk and
First, set up a new drive to store the metadata directory for the replacement node (a SSD is recommended),
and for the data directory if necessary. You can then start Garage on the new node.
-The restarted node should generate a new node ID, and it should be shown as `NOT CONFIGURED` in `garage status`.
+The restarted node should generate a new node ID, and it should be shown with `NO ROLE ASSIGNED` in `garage status`.
The ID of the lost node should be shown in `garage status` in the section for disconnected/unavailable nodes.
Then, replace the broken node by the new one, using: