Configure NGINX
Configure NGINX
Create a config file for LibreNMS
vi /etc/nginx/conf.d/librenms.conf
Add the following config, edit server_name
as required:
server {
listen 80;
server_name uksrpedklnmv01.imp.net;
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 /api/v0 {
try_files $uri $uri/ /api_v0.php?$query_string;
}
location ~ \.php {
include fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Delete or comment out the server section from /etc/nginx/nginx.conf
(I just commented it out)

Enable auto-start and restart NGINX
systemctl enable nginx
systemctl restart nginx
