feat: icinga2 web oauth2

This commit is contained in:
2023-06-27 15:50:26 +00:00
parent b001af119b
commit d2a589fee6
4 changed files with 83 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
server {
listen 80;
listen 9080;
server_name icinga.atlantishq.de;
#auth_basic "ICINGA";
#auth_basic_user_file /etc/nginx/auth/stats_auth;
access_log /var/log/nginx/access-icinga.log;
error_log /var/log/nginx/error-icinga.log;
location = / {
return 302 https://icinga.atlantishq.de/icingaweb2;
}
##### ICINGA WEB #####
location ~ ^/icingaweb2/index\.php(.*)$ {
include fastcgi.conf;
include fastcgi_params;
# fastcgi_temp_path fastcgi;
fastcgi_pass unix:/etc/alternatives/php-fpm.sock;
fastcgi_index index.php;
# fastcgi_param SCRIPT_NAME /usr/share/icingaweb2/public/index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/icingaweb2/public/index.php;
fastcgi_param ICINGAWEB_CONFIGDIR /etc/icingaweb2;
fastcgi_param REMOTE_USER $http_x_forwarded_preferred_username;
}
location ~ ^/icingaweb2(.+)? {
alias /usr/share/icingaweb2/public;
index index.php;
try_files $1 $uri $uri/ /icingaweb2/index.php$is_args$args;
}
}