0

Can't tell if this is Icinga or nginx, but when I pull up Icinga classic web I get the binary cgi displayed on the screen.

Here's a screenshot: http://i.imgur.com/ZHFYB4k.png

It seems to be the binary data from "tag.cgi".

Here's my nginx config:

     # Icinga ---------------------------------------------------------
     location /icinga/ {
               alias                   /usr/share/webapps/icinga/;
               auth_basic              "Icinga Access";
               auth_basic_user_file    /etc/icinga/htpasswd.users;
     }

     location ~ ^/icinga/(.*)\.cgi$ {
              root           /usr/share/webapps/;
              fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
              include        fastcgi.conf;
              fastcgi_param  AUTH_USER          $remote_user;
              fastcgi_param  REMOTE_USER        $remote_user;
              # rewrite        ^/icinga/cgi-bin/(.*)\.cgi /$1.cgi break;
              include        /etc/nginx/fastcgi_params;
              fastcgi_index  index.php;
              fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
              auth_basic     "Icinga Access";
              auth_basic_user_file    /etc/icinga/htpasswd.users;
              }

Any idea what's happening?

2

Icinga main page consist of three frame

  1. The left panel which consists of pure HTML menu.html
  2. The top panel which consists of CGI output cgi-bin/tac.cgi?tac_header
  3. The main window which consists of CGI output too cgi-bin/tac.cgi?tac_header

The reason your nginx spitting the binary instead CGI-generated page is, you pass the request to PHP-FPM socket. PHP FPM process only understands PHP language, but the Icinga itself written mainly in C/C++.

By default Nginx can't handle CGI, so you must add another CGI wrapper in your server, for example fcgiwrap. Icinga official wiki has example of nginx configuration in this page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.