diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-11-08 10:14:13 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-11-08 12:20:40 +0100 |
commit | 8e25a37f0e1d0b2584b3de2439df47f6b47e4d4c (patch) | |
tree | a0db1ca605aec99802523aa1fa6c93d08027fe80 /doc/book/src/connect | |
parent | e342db19aa23cdbfe720ff2407080fab549f3e2d (diff) | |
download | garage-8e25a37f0e1d0b2584b3de2439df47f6b47e4d4c.tar.gz garage-8e25a37f0e1d0b2584b3de2439df47f6b47e4d4c.zip |
Add documentation for nginx
Diffstat (limited to 'doc/book/src/connect')
-rw-r--r-- | doc/book/src/connect/apps.md | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/doc/book/src/connect/apps.md b/doc/book/src/connect/apps.md index 7bb0fc7f..20075f43 100644 --- a/doc/book/src/connect/apps.md +++ b/doc/book/src/connect/apps.md @@ -253,35 +253,7 @@ Make sure you (will) have a corresponding DNS entry for them. Now we will configure a reverse proxy in front of Garage. This is required as we have no other way to serve CORS headers yet. -For our example, we will use nginx: - -```nginx -server { - # In production you should use TLS instead of plain HTTP - listen [::]:80; - - server_name peertube-video.web.garage peertube-playlist.web.garage; - - 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 request to Garage - # as it does not know how to interpret them. - # Instead, we simply answers 200. - if ($request_method !~ ^(GET|HEAD)$ ) { - 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; - } -} -``` +Check the [Configuring a reverse proxy](/cookbook/reverse_proxy.html) section to know how. Now make sure that your 2 dns entries are pointing to your reverse proxy. |