Hello
the following diff is for  the smokeping readme to assist users
in getting smokeping as an fcgi with httpd
while trying to maintain the chroot jail for the smokeping webpage...
if any one has comments on the approach i have taken or if it can be
done more securely.
my approach was to try to run the smokeping web front end in a similar fashion
to bgplg
comments / corrections welcome

diff /usr/local/share/doc/pkg-readmes/smokeping
/usr/local/share/doc/pkg-readmes/smokeping-tom
24a25,26
>
>
45a48,89
>
> Smokeping as an fcgi with OpenBSD's httpd
> ==============================
> The following is an example configuration of httpd.conf so
> that it will run smokping fcgi
>
> server "your.ip.address." {
>         listen on * port 80
>         location "/smokeping/smokeping.fcgi*" {
>         fastcgi socket "/run/smokeping.sock"
>         root "/"
>         }
>
> }
>
> # the following creates the directory for smokeping datafiles
> mkdir /var/db/smokeping
> chown _smokeping /var/db/smokeping
>
> the following copies the /etc/smokeping/config so that the config
> is available in the chrootjail
>
> mkdir -p /var/www/etc/smokeping
> cp /etc/smokeping/config /var/www/etc/smokeping
> rm /etc/smokeping/config
> ln -s /var/www/etc/smokeping  /etc/smokeping/config
> cp /usr/local/bin/smokeping_cgi /var/www/cgi-bin/
> chmod 0555 /var/www/cgi-bin/smokeping_cgi
>
>
> #edit smokeping.fcgi to call the fcgi in cgi-bin
> echo #!/bin/sh >/var/www/htdocs/smokeping/smokeping.fcgi
> echo exec /cgi-bin/smokeping_cgi /etc/smokeping/config 
> >>/var/www/htdocs/smokeping/smokeping.fcgi
>
> rcctl enable smokeping
> rcctl enable smokeping_fcgi
> rcctl enable httpd
>
> rcctl start smokeping
> rcctl start smokeping_fcgi
> rcctl start httpd
>


-- 
Kindest regards,
Tom Smyth.

Reply via email to