# Icinga Classic - Configuration
    location /icinga {
        alias   /usr/local/icinga/share;
        index  index.html;
        auth_basic              "Icinga Access";
        auth_basic_user_file    /usr/local/icinga/etc/htpasswd.users;
    }

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

