Hello all - I have a working (HTTPS) LibreNMS implementation. The following is my /etc/nginx/conf.d/librenms.conf output:
server {
listen 80;
server_name nms.domain.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443;
server_name nms.domain.com;
ssl on;
ssl_certificate /etc/ssl/cert.pem;
ssl_certificate_key /etc/ssl/privkey.pem;
ssl_session_cache shared:SSL:50m;
root /opt/librenms/html;
index index.php;
access_log /opt/librenms/logs/access_log;
error_log /opt/librenms/logs/error_log;
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 /api/v0 {
try_files $uri $uri/ /api_v0.php?$query_string;
}
location ~ \.php {
include fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
I am trying to reverse proxy this setup with Nginx. I have a reverse proxy setup that works with Nextcloud, OwnCloud, etc. no problem. I would like to use SSL at the reverse proxy, which I’ve done before a number of times, but for some reason I just get bad gateway over and over. DNS is correct and resolves correctly. I must be missing something to satisfy the LibreNMS config. Does anyone have this working? Thanks!
