@@ -143,7 +143,7 @@ dbserver.example.org:*:hydra:hydra:password</screen>
143
143
144
144
Make sure that the <emphasis >HYDRA_DATA</emphasis > directory
145
145
exists and is writable for the user which will run the Hydra
146
- services.
146
+ services.
147
147
</para >
148
148
149
149
<para >
@@ -220,6 +220,58 @@ hydra-server</screen>
220
220
221
221
</section >
222
222
223
+ <section >
224
+ <title > Serving behind reverse proxy </title >
225
+
226
+ <para >
227
+ To serve hydra web server behind reverse proxy like
228
+ <emphasis >nginx</emphasis > or <emphasis >httpd</emphasis > some
229
+ additional configuration must be made.
230
+ </para >
231
+
232
+ <para >
233
+ Edit your <literal >hydra.conf</literal > file in a similar way to
234
+ this example:
235
+
236
+ <screen >
237
+ using_frontend_proxy 1
238
+ base_uri example.com</screen >
239
+
240
+ <literal >base_uri</literal > should be your hydra servers proxied URL.
241
+
242
+ If you are using Hydra nixos module then setting <literal >hydraURL</literal >
243
+ option should be enough.
244
+
245
+ </para >
246
+
247
+ <para >
248
+
249
+ If you want to serve Hydra with a prefix path, for example
250
+ <ulink >http://example.com/hydra</ulink > then you need to configure your
251
+ reverse proxy to pass <literal >X-Request-Base</literal > to hydra, with
252
+ prefix path as value.
253
+
254
+ For example if you are using nginx, then use configuration similar to following:
255
+ <screen >
256
+ server {
257
+ listen 433 ssl;
258
+ server_name example.com;
259
+ .. other configuration ..
260
+ location /hydra/ {
261
+
262
+ proxy_pass http://127.0.0.1:3000;
263
+ proxy_redirect http://127.0.0.1:3000 https://example.com/hydra;
264
+
265
+ proxy_set_header Host $host;
266
+ proxy_set_header X-Real-IP $remote_addr;
267
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
268
+ proxy_set_header X-Forwarded-Proto $scheme;
269
+ proxy_set_header X-Request-Base /hydra;
270
+ }
271
+ }</screen >
272
+
273
+ </para >
274
+ </section >
223
275
</chapter >
224
276
225
277
<!--
0 commit comments