I would like to run datastax cassandra opscenter behind Nginx. But it keeps adding opscenter port (8888 by default) to all urls. Is there a config setting to disable that or something?
Here is my super simple nginx config:
server {
server_name opscenter.hostname.com;
location / {
proxy_pass http://127.0.0.1:8888;
}
}
Is there something I'm doing wrong maybe?
Solved this by adding nginx redirect to /opscenter
You need to create location like the following:
}
The
proxy_redirect
lines will strip the8888
from the responses returned by OpsCenter.More info on what
proxy_redirect
does can be found at http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirectI tried the suggested configurations and more, but none of them worked for me.
Here is my use case, and my solution.
My servers
Nginx and OpsCenter are both on 2 different machines. Unlike Nginx, OpsCenter is not accessible directly from the internet.
Nginx 1.4.6 is on
172.132.1.2
(public network)OpsCenter 5.2.0 is on
172.132.2.3
(private network)Nginx Configuration