502 Bad Gateway

I’ve followed the install instructions several times- and each time I get the 502 Bad Gateway error page when trying to get to the /install URL -
I was told that it means that php-fpm isn’t running or nginx is misconfigured
however my nginx config matches the contents of the Configure Web Server section of the install instructions with exception to the domain name. I’ve tried using both the FQDN and just the hostname for the server_name field of the nginx configuration but the result is the same. I’m not sure how to troubleshoot this. Please help.

Check your config of nginx and fpm regarding the user and group.

hey Jarod2801- thanks for responding.
I’ve used the Install LibreNMS instructions as a guide- are you referring to the librenms.conf edits for PHP-FPM and NGINX? If so, I made those edits as written there- with exception to the server_name alias in the nginx configuration.

Check the user and group in nginx and php-fpm conf.
I think it should be nginx. But not exactly sure as I am on the road atm.

If you’re referring changing:

user = www-data to user = librenms
group = www-data to group = librenms

I made those changes. They’re within: /etc/php/7.4/fpm/pool.d/librenms.conf

The /etc/php/7.4/fpm/php-fpm.conf file does not have these entries.

There is another section within the /etc/php/7.4/fpm/pool.d/librenms.conf file where it has:

;listen.owner = www-data
;listen.group = www-data
;listen.mode = 0660

;listen.acl_users =
;listen.acl_groups =

Checkout this thread Ubuntu 20.04 install "502 Bad Gateway"

Specifically this:
In the error, the socket file is different then what is in your php-fpm config:
connect() to unix:/run/php7.4-fpm-librenms.sock failed
is not the same as:
listen = /run/php/php7.4-fpm-librenms.sock
(note the extra /php/ directory)

Thank you both- this was absolutely the answer- my eyes kept scanning over this and not seeing the error so blatantly their.