-
Notifications
You must be signed in to change notification settings - Fork 172
Using Flood behind a reverse proxy
In order to use Flood behind a reverse proxy, you must be sure to forward all requests to Flood's node server.
Often people want to expose multiple web applications with a single nginx config. This is possible using Flood's baseURI
option and nginx's proxy_pass
.
In the following configuration example, let's assume Flood is running at 127.0.0.1:3000
, and that you would like to serve Flood from nested route /flood
(e.g. https://some-domain.com/flood
).
Your nginx config should contain these rules:
location /flood/ {
proxy_pass http://127.0.0.1:3000/;
}
Your Flood config should contain the following value:
baseURI: '/flood'
Note: You must recompile static assets after changing the baseURI
configuration option.
Now, let's assume Flood is running at 127.0.0.1:3000
, and that you would like to serve Flood from the root (e.g. https://some-domain.com
).
Your nginx config should contain these rules:
location / {
proxy_pass http://127.0.0.1:3000;
}
And your Flood config should contain the following values:
baseURI: '/'