# icingacli setup config webserver nginx --document-root /usr/share/icingaweb2/public --config /etc/icingaweb2 --fpm-uri 127.0.0.1:9000 server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name ${server_name}; root /usr/share/icingaweb2/public; ssl_certificate /var/lib/dehydrated/certs/${server_name}/fullchain.pem; ssl_certificate_key /var/lib/dehydrated/certs/${server_name}/privkey.pem; location /api/ { proxy_pass https://127.0.0.1:5665/; proxy_http_version 1.1; } location / { return 302 /icingaweb2/index.php; } location ~ ^/icingaweb2/index\.php(.*)$ { fastcgi_pass unix:/run/php/php${php_version}-fpm.sock; fastcgi_index index.php; include params/fastcgi; 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; } }