FAIL: server_name is set incorrectly for your webserver, update your webserver config. <IP> parse failure (/validate/results)

Hello.
Today, I noticed that the Validate Config (GUI), is failing with the following error:
FAIL: server_name is set incorrectly for your webserver, update your webserver config. parse failure (/validate/results)
The thing is, if I go to the CLI and execute ./validate.php , it is completed successfully
I’ve already checked the librenms.conf (/etc/nginx/conf.d/librenms.conf), and everything is OK (and the suggested server_name fix is already there), after that, I restarted nginx, but the error persists.
Any suggestions?
Best regards.

Make sure base_url is set correctly

Hello laf.
Thank you for your reply.
I’ve not changed anything on the LibreNMS config.
For example, the URL of my LibreNMS is http://172.30.0.200/
My librenms.conf is as follows:

cat /etc/nginx/conf.d/librenms.conf
server {
listen 80;
server_name 172.30.0.200;
root /opt/librenms/html;
index index.php;

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/php8.3-fpm.sock;
fastcgi_split_path_info ^(.+.php)(/.+)$;
include fastcgi.conf;
}
location ~ /.(?!well-known).* {
deny all;
}
}

And my System/Server settings are as follows:

The thing is, everything appears to be working correctly, aside from that error.
Best regards.

I am also having exact same problem.

Your base url needs to be set to the full URL as per your web server config

Hello laf.
After running the command

lnms config:get base_url

I can see it’s correctly set:

But, if I Validate the Config, the error keeps showing:

And, this error start showing all of a sudden since yesterday (and no change has been made on the server).
Is it possible that the daily update broke something?

Best regards.

What is your web server config set to?

Hello laf (I cannot login using the other account on my mobile)
My webserver config is the following:

cat /etc/nginx/conf.d/librenms.conf
server {
listen 80;
server_name 172.30.0.200;
root /opt/librenms/html;
index index.php;

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/php8.3-fpm.sock;
fastcgi_split_path_info ^(.+.php)(/.+)$;
include fastcgi.conf;
}
location ~ /.(?!well-known).* {
deny all;
}
}

try setting base url without the last /

Hello laf.
I’ve just arrived home and ran Validate Config (without changing any setting whatsoever), and everything is OK):


Was there any update of LibreNMS?
Update, it’s with the error again

New update:
After checking the base URL again before changing it, I noticed that it was wrong, so I corrected it, using the command

lnms config:set base_url http://172.30.0.200

image

It’s strange, because it was right before, maybe some update changed it.
Anyway, it seems that it’s fixed for the time being, but I’ll continue to monitor to check if it happens again.
Best regards and thank you for your support :smiley:

1 Like

No updates have been done to that part of validation nor overriding users config. Glad you got it sorted though.