aboutsummaryrefslogtreecommitdiff
path: root/doc/book/src/cookbook/reverse_proxy.md
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-11-04 12:06:38 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-11-08 12:20:40 +0100
commitf3405b6378abf29c7d1cd2bd81b6c2bdfccf0867 (patch)
tree335cd2b089f981d126fc3e3712cad5e35e8e550a /doc/book/src/cookbook/reverse_proxy.md
parent860ccf281175b50aaaf66453cfc408ea8c1e70e2 (diff)
downloadgarage-f3405b6378abf29c7d1cd2bd81b6c2bdfccf0867.tar.gz
garage-f3405b6378abf29c7d1cd2bd81b6c2bdfccf0867.zip
Doc about exposing your website
Diffstat (limited to 'doc/book/src/cookbook/reverse_proxy.md')
-rw-r--r--doc/book/src/cookbook/reverse_proxy.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/book/src/cookbook/reverse_proxy.md b/doc/book/src/cookbook/reverse_proxy.md
index 658f8421..b4674852 100644
--- a/doc/book/src/cookbook/reverse_proxy.md
+++ b/doc/book/src/cookbook/reverse_proxy.md
@@ -1 +1,39 @@
# Configuring a reverse proxy
+
+## Nginx
+
+```nginx
+server {
+ # In production you should use TLS instead of plain HTTP
+ listen [::]:80;
+
+ # We
+ server_name *.web.garage
+ example.com
+ my-site.tld
+ ;
+
+ location / {
+ add_header Access-Control-Allow-Origin *;
+ add_header Access-Control-Max-Age 3600;
+ add_header Access-Control-Expose-Headers Content-Length;
+ add_header Access-Control-Allow-Headers Range;
+
+ # We do not forward OPTIONS requests to Garage
+ # as it does not support them but they are needed for CORS.
+ if ($request_method = OPTIONS) {
+ return 200;
+ }
+
+ # If your do not have a Garage instance on the reverse proxy, change the URL here.
+ proxy_pass http://127.0.0.1:3902;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $host;
+ }
+}
+```
+
+
+## Apache httpd
+
+## Traefik