Icinga Web with Nginx


Run the setup CLI module command to generate a fresh Nginx configuration for your given paths.


icingacli setup config webserver nginx --document-root /usr/share/icingaweb2/public --config /etc/icingaweb2 --fpm-uri

location ~ ^/icingaweb2/index\.php(.*)$ {
  fastcgi_index index.php;
  include fastcgi_params;
  fastcgi_param SCRIPT_FILENAME /usr/share/icingaweb2/public/index.php;
  fastcgi_param ICINGAWEB_CONFIGDIR /etc/icingaweb2;
  fastcgi_param REMOTE_USER $remote_user;

location ~ ^/icingaweb2(.+)? {
  alias /usr/share/icingaweb2/public;
  index index.php;
  try_files $1 $uri $uri/ /icingaweb2/index.php$is_args$args;

Resources and Hints

Your configuration

Please share your running configuration, e.g. with a VHost, TLS enabled or in proxy mode. Thanks in advance :heart:

when i try this error show

root@afnan:~# icingacli setup config webserver nginx --document-root /usr/share/icingaweb2/public --config /etc/icingaweb2 -fpm-uri
ERROR: There is no such module or command: ‘setup’

USAGE: icingacli [module] [action] [options]

Available commands:

help Help for modules, commands and actions
module List and handle modules

Available modules:


Global options:

–log [t] Log to , either stderr, file or syslog (default: stderr)
–log-path Which file to log into in case of --log file
–verbose Be verbose
–debug Show debug output
–help Show help
–benchmark Show benchmark summary
–watch [s] Refresh output every seconds (default: 5)

Show help on a specific command : icingacli help
Show help on a specific module : icingacli help