forked from infra/ansible
37 lines
837 B
Django/Jinja
37 lines
837 B
Django/Jinja
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name {{ icinga_domain }};
|
|
|
|
location / {
|
|
return 301 https://{{ icinga_domain }}$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
|
|
server_name {{ icinga_domain }};
|
|
|
|
ssl_certificate_key /etc/nginx/ssl/{{ icinga_domain }}.key;
|
|
ssl_certificate /etc/nginx/ssl/{{ icinga_domain }}.crt;
|
|
|
|
location ~ ^/icingaweb2/index\.php(.*)$ {
|
|
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
|
|
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;
|
|
}
|
|
|
|
}
|