Unfortunately, this suggestion did not improve our situation. We can access the site; we can login; but anything after that, we get “File not found.”

 

Resulting log data:

 

Our current nginx configuration for observium has the following:

server {

 

listen 443 ssl;

server_name uatobservium.library.vanderbilt.edu;

root        /apps/observium/html;

index       index.php;

 

error_log /var/log/nginx/observium-error.log debug;

access_log /var/log/nginx/observium-access.log;

 

include /etc/passbolt/nginx-ssl.conf;

 

location / {

  try_files $uri $uri/ index.php;

}

location ~ [^/]\.php(/|$) {

  fastcgi_pass unix:/run/php/observium-fpm.sock;

  fastcgi_split_path_info ^(.+\.php)(/.+)$;

  fastcgi_index index.php;

  include fastcgi_params;

  include fastcgi.conf;

}

location ~ /\.(?!well-known).* {

  deny all;

}

}

 

And our pool.d/observium.conf file (for use with php7.4-fpm):

 

; Start a new pool.

[observium]

 

; Unix user/group of processes

user = www-data

group = www-data

 

; The address on which to accept FastCGI requests.

listen = /run/php/observium-fpm.sock

 

; Set permissions for unix socket, if one is used. In Linux, read/write

listen.owner = www-data

listen.group = www-data

listen.mode = 0660

 

; Choose how the process manager will control the number of child processes.

pm = dynamic

 

; The number of child processes to be created when pm is set to 'static' and the

; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.

pm.max_children = 50

 

; The number of child processes created on startup.

pm.start_servers = 10

 

; The desired minimum number of idle server processes.

pm.min_spare_servers = 2

 

; The desired maximum number of idle server processes.

pm.max_spare_servers = 15

 

; The URI to view the FPM status page. If this value is not set, no URI will be

; recognized as a status page.

pm.status_path = /status

 

; The access log file

access.log = /var/log/$pool.access.log

 

; The access log format.

access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"

 

; The log file for slow requests

slowlog = /var/log/$pool.log.slow

 

; Redirect worker stdout and stderr into main error log.

catch_workers_output = yes

 

; Additional php.ini defines, specific to this pool of workers. These settings

; overwrite the values previously defined in the php.ini. The directives are the

; same as the PHP SAPI:

php_admin_value[error_log] = /var/log/fpm-php.www.log

php_admin_flag[log_errors] = on

 

 

Jamen McGranahan
Associate Director of Library Technology & Digital Services, Vanderbilt Library
Vanderbilt University
615.343.1614 | jamen.mcgranahan@vanderbilt.edu | https://www.library.vanderbilt.edu/

Central Library, 419 21st Avenue South
Nashville, TN 37203

Pronouns: he/him/his

 

 

From: Adam Thompson <athompson@merlin.mb.ca>
Sent: Sunday, June 11, 2023 5:05 PM
Cc: McGranahan, Jamen (VU) <jamen.mcgranahan@vanderbilt.edu>
Subject: Re: Nginx

 

You don't often get email from athompson@merlin.mb.ca. Learn why this is important

At a bare minimum, you're declaring handlers for *.php twice.  Having empty {} blocks in nginx is an anti-pattern - if those are really empty, they're no-ops and you should delete them.

 

The LibreNMS instructions cover nginx, the config should still be ~90% applicable to Observium.  https://docs.librenms.org/Installation/Install-LibreNMS/#configure-php-fpm

 


From: McGranahan, Jamen (VU) via observium <observium@lists.observium.org>
Sent: Sunday, June 11, 2023 9:37:36 AM
To: Lars Joergensen via observium <observium@observium.org>
Cc: McGranahan, Jamen (VU) <jamen.mcgranahan@vanderbilt.edu>
Subject: [Observium] Nginx

 

We are needing to move our current Observium instance to an Nginx instance, but I am having a extremely difficult time getting it set up. I can get to the login page and we can all login, but after that, we’re not able to access any of the other pages. I know the htaccess file in the html folder has to be converted to nginx supported format, which I have done, but still no luck. Added to the complication is that we are having to run this on a machine running php7.4-fpm. Is there any guidance on getting Observium running on a Debian 11 instance using Nginx and PHP7.4-FPM? Please advise. Thank you.

 

Current Nginx config:

 

server {

 

  listen 80;

 

  server_name uatobservium.library.vanderbilt.edu;

 

  root /apps/observium/html;

  index index.php;

  error_log /var/log/nginx/observium-error.log info;

  access_log /var/log/nginx/observium-access.log;

 

  location ~ \.php$ {

    try_files                $uri $uri/ index.php;

    include                  fastcgi_params;

    fastcgi_pass             unix:/run/php/observium-fpm.sock;

    fastcgi_index            index.php;

    fastcgi_intercept_errors on;

    fastcgi_split_path_info  ^(.+\.php)(.+)$;

    fastcgi_param            SCRIPT_FILENAME $document_root$fastcgi_script_name;

    fastcgi_param            SERVER_NAME $http_host;

    fastcgi_param PHP_VALUE  "upload_max_filesize=5M \n post_max_size=5M";

  }

 

  location ~ favicon\.ico {

  }

 

  location ~ 404 {

    rewrite ^(.*)$ /\. redirect;

  }

 

  location ~ ^/\..*$ {

    return 403;

  }

 

  location ~ \.(js|ico|txt|gif|jpg|png|css|php) {

  }

 

  location ~ api/ {

  }

 

  location ~ rrd/ {

  }

 

  location = /server-status {

  }

 

  location / {

    if (!-e $request_filename){

      rewrite ^(.*)$ index.php/$1/;

    }

  }

 

}

 

 

Jamen McGranahan
Associate Director of Library Technology & Digital Services, Vanderbilt Library
Vanderbilt University
615.343.1614 | jamen.mcgranahan@vanderbilt.edu | https://www.library.vanderbilt.edu/

Central Library, 419 21st Avenue South
Nashville, TN 37203

Pronouns: he/him/his