Nginx server does not hiding opennms url

Hello ,
I configured ‘nginx’ in centos and it successfully redirects my request from ’ [https://nginx:8990]’ to ’ …/opennms/login.jsp’. But after login to opennms portal, actual opennms urls are getting exposed instead of nginx url.

Here is my proxy configuration from nginx – /etc/nginx/conf.d/proxy.conf

server {

listen 8990 ssl;
server_name opennms;
ssl on;
ssl_certificate /etc/nginx/ssl/rpwildcard.crt;
ssl_certificate_key /etc/nginx/ssl/rpwildcard.key;
location / {
proxy_pass http://opennms:8980;

Am I missing any configuration which could hide my opennms url to the user/browse ?


do you need to set this in

# If OpenNMS is setting an incorrect HTML <base> tag, you can override
# its idea of the local URL here. The URL must end with a '/'. The following
# substitutions are available:
# %s: scheme (http, https)
# %h, %p: host and port from the Host: header
# %x: host and port from the X-Forwarded-Host, X-Host or Host header
# %c: context path (without trailing slash)
# You can use this to get Jetty working behind an Apache/SSL proxy.
# Set the base-url to https://%x%c/ and include in your Apache SSL vhost:
#     <Location /opennms>
#         ProxyPass
#         ProxyPassReverse
#     </Location>
#opennms.web.base-url = https://%x%c/

Thanks a lot .
It worked I did this configuration in opennms and configured the following in nginx

Thank you
1 Like