View | Details | Raw Unified | Return to bug 214515 | Differences between
and this patch

Collapse All | Expand All

(-)observium/Makefile (-4 / +7 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	observium
4
PORTNAME=	observium
5
PORTVERSION=	0.16.10.8128
5
PORTVERSION=	0.16.10.8128
6
PORTREVISION=	0
7
CATEGORIES=	net-mgmt
6
CATEGORIES=	net-mgmt
8
MASTER_SITES=	http://www.observium.org/
7
MASTER_SITES=	http://www.observium.org/
9
DISTNAME=	${PORTNAME}-community-latest
8
DISTNAME=	${PORTNAME}-community-latest
Lines 12-18 Link Here
12
MAINTAINER=	dirkx@webweaving.org
11
MAINTAINER=	dirkx@webweaving.org
13
COMMENT=	Autodiscovering PHP/MySQL/SNMP based network monitoring
12
COMMENT=	Autodiscovering PHP/MySQL/SNMP based network monitoring
14
13
15
LICENSE=	GPLv3
14
LICENSE=        EULA
15
LICENSE_NAME=	"Observium License Version 1.0"
16
LICENSE_FILE=	${WRKSRC}/LICENSE.COMMUNITY
17
LICENSE_PERMS=  dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
16
18
17
WRKSRC=		${WRKDIR}/${PORTNAME}
19
WRKSRC=		${WRKDIR}/${PORTNAME}
18
20
Lines 89-95 Link Here
89
91
90
.include <bsd.port.options.mk>
92
.include <bsd.port.options.mk>
91
93
92
SUB_FILES+=	pkg-message
94
SUB_FILES+=	pkg-message observium.conf.sample
93
SUB_LIST+=	PHP="${PHPBASE}/bin/php" PYTHON=${PHPBASE}/bin/python
95
SUB_LIST+=	PHP="${PHPBASE}/bin/php" PYTHON=${PHPBASE}/bin/python
94
96
95
ROOT_FILES=	rename_device.php snmptrap.php add_device.php \
97
ROOT_FILES=	rename_device.php snmptrap.php add_device.php \
Lines 119-125 Link Here
119
	${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php
121
	${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/poller-wrapper.py ${WRKSRC}/poller.php
120
122
121
do-install:
123
do-install:
122
	${MKDIR} ${STAGEDIR}/${WWWDIR}
124
	${MKDIR} ${STAGEDIR}/${WWWDIR} ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes
123
.for dir in ${ROOT_DIRS}
125
.for dir in ${ROOT_DIRS}
124
	${MKDIR} ${STAGEDIR}/${WWWDIR}/${dir}
126
	${MKDIR} ${STAGEDIR}/${WWWDIR}/${dir}
125
	cd ${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/${dir}
127
	cd ${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/${dir}
Lines 148-152 Link Here
148
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${EXAMPLESDIR}
150
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${EXAMPLESDIR}
149
.endfor
151
.endfor
150
.endif
152
.endif
153
	${INSTALL_DATA} ${WRKDIR}/observium.conf.sample ${STAGEDIR}/${PREFIX}/${APACHEETCDIR}/Includes
151
154
152
.include <bsd.port.mk>
155
.include <bsd.port.mk>
(-)observium/files/observium.conf.sample.in (+66 lines)
Line 0 Link Here
1
2
# Observium cannot be ran on a sub-uri (See the FAW
3
# http://observium.org/docs/faq/). Hence this strawman
4
# config runs it as a virtual host on port 8080.
5
#
6
# Replace the '*:8080' by the actual virtual host(name)
7
# you will be using; and consider enabling SSL. An example 
8
# can be fund at e /usr/local/etc/apache24/extra/httpd-ssl.conf
9
#
10
11
Listen *:8080
12
<VirtualHost *:8080>
13
  Documentroot "%%WWWDIR%%/html"
14
  AddHandler application/x-httpd-php .php
15
  #
16
  # CustomLog "/var/log/httpd-observium-access.log" common
17
18
  DirectoryIndex index.php
19
  <Directory "%%WWWDIR%%/html">
20
     Options Indexes FollowSymLinks Multiviews
21
     AllowOverride None
22
23
     # These:w statement mirror the .htaccess
24
     # files that are part of the normal
25
     # Observium distribution. See the URL:
26
     #
27
     # https://httpd.apache.org/docs/current/howto/htaccess.html#when
28
     #
29
     # for the various reasons to promote 
30
     # these to an apache config file.
31
     #
32
     RedirectMatch 404 /\.
33
34
     RewriteEngine on
35
     RewriteBase /
36
37
     # Block access to hidden files/dirs
38
     RewriteRule ^\..*$ - [F,L]
39
     # Don't favicon!
40
     RewriteCond %{REQUEST_FILENAME} !^favicon\.ico
41
     RewriteCond %{REQUEST_FILENAME} !-f
42
     RewriteCond %{REQUEST_FILENAME} !-d
43
     RewriteCond %{REQUEST_URI} !\.(js|ico|txt|gif|jpg|png|css|php)
44
     RewriteCond %{REQUEST_URI} !^api/
45
     RewriteCond %{REQUEST_URI} !^rrd/
46
     RewriteCond %{REQUEST_URI} !=/server-status
47
     RewriteRule ^(.*)$ index.php/$1/
48
49
     AcceptPathInfo On
50
     Require all granted
51
  </directory>
52
53
  <Directory "%%WWWDIR%%/pages">
54
      deny from all
55
  </Directory>
56
57
  <Directory "%%WWWDIR%%/html/print">
58
      deny from all
59
  </Directory>
60
61
  <Directory "%%WWWDIR%%/includes">
62
      deny from all
63
  </Directory>
64
65
</VirtualHost>
66
(-)observium/files/pkg-message.in (+14 lines)
Lines 56-62 Link Here
56
56
57
5: Install the above crontabs.
57
5: Install the above crontabs.
58
58
59
6: Copy the file
60
61
   mv %%PREFIX%%/%%APACHEETCDIR%%/Includes/observium.conf.sample \
62
          %%PREFIX%%/%%APACHEETCDIR%%/Includes/observium.conf
63
   
64
   and edit it to fill out a port number and hostname. 
65
66
7: restart the webserver with 
67
68
       apachectl restart
69
70
   or stop/start if in case of IP or SSL changes.
71
59
6: log in with a web browser; using the username 'admin' and the
72
6: log in with a web browser; using the username 'admin' and the
60
   password 'SomeInsecureAdminPassword'.
73
   password 'SomeInsecureAdminPassword'.
61
74
62
   Hosts can be added from the webinterface or from the commandline.
75
   Hosts can be added from the webinterface or from the commandline.
76
(-)observium/pkg-plist (+1 lines)
Lines 11549-11551 Link Here
11549
@dir(www,www,) %%WWWDIR%%/logs
11549
@dir(www,www,) %%WWWDIR%%/logs
11550
@dir(www,www,) %%WWWDIR%%/rrd
11550
@dir(www,www,) %%WWWDIR%%/rrd
11551
@dir %%WWWDIR%%/scripts/agent-local/munin-scripts
11551
@dir %%WWWDIR%%/scripts/agent-local/munin-scripts
11552
%%APACHEETCDIR%%/Includes/observium.conf.sample

Return to bug 214515