How to reproduce:
Make a port-forward on the firewall which is internet facing (i.e 6789 → 80)
Configure Nginx librenms.vhost as per documentation. Or use an IP in the server_name
Try and access. Some links (i.e ports) go to the Private IP of the server and not the public IP. Internally works okay.
I’ve tried
port_in_redirect off;
absolute_redirect off;
in the nginx config but to no avail. You still get a et::ERR_CONNECTION_TIMED_OUT to some resources. Can’t tell if it’s related to the stuff at the end of the config.
My config.
server {
listen 6790;
server_name 192.168.0.71;
root /opt/librenms/html;
index index.php;
port_in_redirect off;
absolute_redirect off;
charset utf-8;
gzip on;
gzip_types text/css application/javascript text/javascript application/x-javascript image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/].php(/|$) {
fastcgi_pass unix:/run/php-fpm-librenms.sock;
fastcgi_split_path_info ^(.+.php)(/.+)$;
include fastcgi.conf;
}
location ~ /.(?!well-known).* {
deny all;
}
}