aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/pnp/files/pkg-message.in
blob: 9656a942233eaeca2584e613c54e9401b00cd04f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
[
{ type: install
  message: <<EOM
You just installed/upgraded PNP graphing tool for %%NAGIOSUSER%%.

You will need to read the documentation at
  http://docs.pnp4nagios.org/pnp-0.6/doc_complete
both for new installations and upgrades from 0.4, since you will
need to tweak your %%NAGIOSUSER%% and PNP configuration according to the
0.6.x recipes.

We recommend to start with the following restrictive Apache configuration for
the PNP area:
{{{
# PNP graphing tool
Alias %%PNP_URL%% %%WWWDIR%%
<Directory "%%WWWDIR%%/">
    Order deny,allow
    Allow from all
    Deny from all

    AddHandler application/x-httpd-php .php
    DirectoryIndex index.php

    RewriteEngine on
    RewriteBase %%PNP_URL%%/
    # Protect application and system files from being viewed
    RewriteRule ^(application|modules|system) - [F,L]
    # Allow any files or directories that exist to be displayed directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Rewrite all other URLs to index.php/URL
    RewriteRule .* index.php/$0 [PT,L]
</Directory>
# PNP graphing tool
Alias %%PNP_URL%% %%WWWDIR%%

<Directory %%WWWDIR%%>
   <IfModule mod_authz_core.c>
      # Apache 2.4
      <RequireAll>
         Require all granted
         # Require local
         Require valid-user
      </RequireAll>
   </IfModule>
   <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order allow,deny
      Allow from all
      #  Order deny,allow
      #  Deny from all
      #  Allow from 127.0.0.1
      Require valid-user
   </IfModule>

    AuthName "PNP Access"
    AuthType Basic
    AuthUserFile %%PREFIX%%/etc%%NAGIOSHTMURL%%/htpasswd.users

    AddHandler application/x-httpd-php .php
    DirectoryIndex index.php

    RewriteEngine on
    RewriteBase %%PNP_URL%%/
    # Protect application and system files from being viewed
    RewriteRule ^(application|modules|system) - [F,L]
    # Allow any files or directories that exist to be displayed directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Rewrite all other URLs to index.php/URL
    RewriteRule .* index.php/$0 [PT,L]
</Directory>
}}}

Don't forget to install and enable www/mod_php5 as well as mod_rewrite.

If you use another web server like nginx or lighttpd, take a look at
%%EXAMPLESDIR%%

Create %%WWWDIR%%/install.ignore to disable sanity check
and start using PNP.

Please, note that user who runs Apache processes should be able to
read PNP RRD spool files from
  %%PNP_RRDS%%
so you should tune path permissions accordingly.  Probably one could
start from adding Apache user to the group '%%NAGIOSGROUP%%'.

Remember to restart NPCD service after upgrade if you're using
'bulk' mode with NPCD.
EOM
}
]