Set RavenDB in kubernetes cluster using NGINX Reverse Proxy

115 views
Skip to first unread message

Michal Kormaňák

unread,
May 18, 2021, 4:51:26 AM5/18/21
to RavenDB - an awesome database
Hi guys,

I have trouble to set up RavenDB in kubernetes cluster behind the Nginx reverse-proxy. Basically problem is with unexpected redirection in RavenDB which ignore subpath set in nginx.conf.

RavenDb settings:
   "Setup.Mode": "None", 
   "DataDir": "/data/RavenData", 
   "ServerUrl.Tcp":"tcp://0.0.0.0:38888", 
   "ServerUrl": "http://0.0.0.0:8080", 
   "PublicServerUrl":"http://localhost:30080/raven"
}

Nginx settings:
raven                   ravendb.{clusterName}:8080

Basically in Nginx settings I map Ravendb service running in the cluster to the endpoint which will be possible hit from outside.

RavenDb service.yaml settings:

service-raven.PNG


So when I visit url: http://localhost:30080/raven I get redirection to http://localhost:30080/studio/index.html with not found exception because I expected url: http://localhost:30080/raven/studio/index.html.

When I try to run RavenDB in kubernetes without a reverse proxy, everything works fine.

Can you explain my why I get redirection and whether is it possible to run Ravendb behind the reverse proxy ?



Oren Eini (Ayende Rahien)

unread,
May 18, 2021, 9:29:45 AM5/18/21
to ravendb
RavenDB does not support paths in path. 
If you want to setup something like that, use a different hostname and route based on that, instead.

--
You received this message because you are subscribed to the Google Groups "RavenDB - an awesome database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/30e28291-9a53-48f7-b8c2-0cdb42f2c481n%40googlegroups.com.


--
Oren Eini
CEO   /   Hibernating Rhinos LTD
Skype:  ayenderahien
Support:  sup...@ravendb.net
  

Michal Kormaňák

unread,
May 19, 2021, 7:33:51 AM5/19/21
to RavenDB - an awesome database
So, it s mean that currently is not possible run ravenDb in subpath ? 
Because I want to run RavenDB on path with specific route for example : http://localhost:30080/raven. 
So I need to achieve that baseUrl of RavenDB will be http://localhost:30080/raven not just http://localhost:30080.



Dátum: utorok 18. mája 2021, čas: 15:29:45 UTC+2, odosielateľ: Oren Eini
Reply all
Reply to author
Forward
0 new messages