forked from sni/thruk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0032-naemon-httpd.patch
71 lines (68 loc) · 2.46 KB
/
0032-naemon-httpd.patch
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
--- a/thruk.conf 2014-01-25 18:39:13.510437546 +0100
+++ b/thruk.conf 2014-01-27 12:12:05.273581581 +0100
@@ -2,7 +2,7 @@
AddHandler fcgid-script .sh
IPCCommTimeout 120
- <Directory /usr/share/thruk>
+ <Directory @DATADIR@>
Options FollowSymLinks
AllowOverride All
order allow,deny
@@ -12,7 +12,7 @@
Require all granted
</IfModule>
</Directory>
- <Directory /etc/thruk/themes>
+ <Directory @SYSCONFDIR@/themes>
Options FollowSymLinks
allow from all
# required for apache 2.4
@@ -20,7 +20,7 @@
Require all granted
</IfModule>
</Directory>
- <Directory /etc/thruk/plugins>
+ <Directory @SYSCONFDIR@/plugins>
Options FollowSymLinks
allow from all
# required for apache 2.4
@@ -29,31 +29,21 @@
</IfModule>
</Directory>
- # redirect to a startup page when there is no pidfile yet
- RewriteEngine On
- RewriteCond %{REQUEST_METHOD} GET
- RewriteCond %{REQUEST_URI} !^/thruk/startup.html
- RewriteCond %{REQUEST_URI} !^/thruk/side.html
- RewriteCond %{REQUEST_URI} !^/thruk/.*\.(css|png|js)
- RewriteCond %{REQUEST_URI} ^/thruk
- RewriteCond /var/cache/thruk/thruk.pid !-f
- RewriteRule ^(.*)$ /thruk/startup.html?$1 [R=302,L,NE,QSA]
+ Alias @HTMLURL@/documentation.html @DATADIR@/root/thruk/documentation.html
+ Alias @HTMLURL@/startup.html @DATADIR@/root/thruk/startup.html
+ AliasMatch ^@HTMLURL@/(.*\.cgi|.*\.html) @DATADIR@/fcgid_env.sh@HTMLURL@/$1
+ AliasMatch ^@HTMLURL@/plugins/(.*?)/(.*)$ @SYSCONFDIR@/plugins/plugins-enabled/$1/root/$2
+ Alias @HTMLURL@/themes/ @SYSCONFDIR@/themes/themes-enabled/
+ Alias @HTMLURL@ @DATADIR@/root/thruk
- Alias /thruk/documentation.html /usr/share/thruk/root/thruk/documentation.html
- Alias /thruk/startup.html /usr/share/thruk/root/thruk/startup.html
- AliasMatch ^/thruk/(.*\.cgi|.*\.html) /usr/share/thruk/fcgid_env.sh/thruk/$1
- AliasMatch ^/thruk/plugins/(.*?)/(.*)$ /etc/thruk/plugins/plugins-enabled/$1/root/$2
- Alias /thruk/themes/ /etc/thruk/themes/themes-enabled/
- Alias /thruk/ /usr/share/thruk/root/thruk/
-
- <Location /thruk/>
+ <Location @HTMLURL@/>
Options ExecCGI FollowSymLinks
- AuthName "Thruk Monitoring"
+ AuthName "Naemon Monitoring"
AuthType Basic
- AuthUserFile /etc/thruk/htpasswd
+ AuthUserFile @SYSCONFDIR@/htpasswd
Require valid-user
</Location>
- <Location /thruk/cgi-bin/remote.cgi>
+ <Location @HTMLURL@/cgi-bin/remote.cgi>
Order Deny,Allow
Allow from all
Satisfy any