I also wanted to share the /etc/nginx/conf.d/librenms.conf
server {
server_name librenms.dentech.nl;
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-fpm-librenms.sock;
}
location ~ /\.(?!well-known).* {
deny all;
}
location /nginx-status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow ::1;
allow 172.17.255.200;
allow 172.17.255.201;
allow 172.17.255.202;
allow all;
# deny all;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/librenms.dentech.nl/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/librenms.dentech.nl/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = librenms.dentech.nl) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name librenms.dentech.nl;
return 404; # managed by Certbot
}
And here is the /var/log/nginx/error.log
log file:
2023/12/05 09:54:56 [crit] 130650#130650: *2 connect() to unix:/run/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 172.16.1.168, server: librenms.dentech.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "librenms.dentech.nl"
2023/12/05 09:55:05 [crit] 130651#130651: *18 connect() to unix:/run/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: ******, server: librenms.dentech.nl, request: "HEAD /remote/fgt_lang?lang=en HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "145.131.3.75"
2023/12/05 10:05:04 [crit] 132153#132153: *1 connect() to unix:/run/php-fpm-librenms.sock failed (2: No such file or directory) while connecting to upstream, client: *******, server: librenms.dentech.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm-librenms.sock:", host: "145.131.3.75:443"
2023/12/05 10:06:20 [crit] 132428#132428: *1 connect() to unix:/run/php-fpm-librenms.sock failed (2: No such file or directory) while connecting to upstream, client: 172.16.1.168, server: librenms.dentech.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm-librenms.sock:", host: "librenms.dentech.nl"
2023/12/05 10:07:26 [crit] 132427#132427: *5 connect() to unix:/run/php-fpm-librenms.sock failed (2: No such file or directory) while connecting to upstream, client: 172.16.1.168, server: librenms.dentech.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm-librenms.sock:", host: "librenms.dentech.nl"
2023/12/05 10:08:40 [crit] 132427#132427: *7 connect() to unix:/run/php-fpm-librenms.sock failed (2: No such file or directory) while connecting to upstream, client: 172.16.1.168, server: librenms.dentech.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm-librenms.sock:", host: "librenms.dentech.nl"
2023/12/05 10:08:49 [crit] 132428#132428: *8 connect() to unix:/run/php-fpm-librenms.sock failed (2: No such file or directory) while connecting to upstream, client: 172.16.1.168, server: librenms.dentech.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm-librenms.sock:", host: "librenms.dentech.nl"
2023/12/05 10:10:03 [crit] 133079#133079: *2 connect() to unix:/var/run/php8.2-fpm-librenms.sock failed (13: Permission denied) while connecting to upstream, client: 172.16.1.168, server: librenms.dentech.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php8.2-fpm-librenms.sock:", host: "librenms.dentech.nl"