icinga2
This commit is contained in:
23
icinga2/files/icingaweb2.jinja
Normal file
23
icinga2/files/icingaweb2.jinja
Normal file
@@ -0,0 +1,23 @@
|
||||
server {
|
||||
|
||||
server_name icinga.keiran.us;
|
||||
|
||||
rewrite ^/$ http://icinga.keiran.us/icingaweb2 permanent;
|
||||
|
||||
location ~ ^/icingaweb2/index\.php(.*)$ {
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass unix:/var/run//php/php7.0-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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,39 @@
|
||||
|
||||
'icinga2':
|
||||
pkg.installed: []
|
||||
icinga_packages:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- icinga2
|
||||
- icingaweb2
|
||||
|
||||
apache2:
|
||||
service.dead:
|
||||
- enable: False
|
||||
- require_by:
|
||||
- pkg: nginx
|
||||
file.absent:
|
||||
- name: /etc/apache2
|
||||
|
||||
icingaweb2_vhost:
|
||||
file.managed:
|
||||
- name: /etc/nginx/sites-enabled/icingaweb2
|
||||
- source: 'salt://icinga2/files/icingaweb2.jinja'
|
||||
- template: jinja
|
||||
- user: root
|
||||
- group: root
|
||||
- require:
|
||||
- pkg: nginx
|
||||
- watch_by:
|
||||
- service: nginx
|
||||
|
||||
# icingacli setup config directory
|
||||
# icingacli setup token create
|
||||
# icingacli setup token show
|
||||
# visit /icingaweb2/setup
|
||||
|
||||
icingaweb2_enable:
|
||||
file.symlink:
|
||||
- name: /etc/nginx/sites-enabled/icingaweb2
|
||||
- target: /etc/nginx/sites-available/icingaweb2
|
||||
- watch_by:
|
||||
- service: nginx
|
||||
|
||||
|
||||
Reference in New Issue
Block a user