1) Install required packages:
Code: Select all
$ sudo apt-get install apcupsd-cgi lighttpd
2) Configure lighttpd cgi-bin support:
Code: Select all
$ sudo lighttpd-enable-mod cgi
Reload changes:Enabling cgi: ok
Run /etc/init.d/lighttpd force-reload to enable changes
Code: Select all
$ sudo service lighttpd restart
In order for the apcupsd-cgi scripts we've installed to become accessible, they need to be made available under the "/cgi-bin/" folder in the www-root of the lighttpd webserver.
Create a cgi-bin folder:
Code: Select all
$ sudo mkdir /var/www/html/cgi-bin
Code: Select all
$ sudo ln -s /usr/lib/cgi-bin/apcupsd/ /var/www/html/cgi-bin/
(Change "yourraspbianserver.home" to match your setup)
NOTE: Opening "/cgi-bin/apcupsd" will not work!
Lighttpd does not provide directory listings by default, so you'll get a "404 not found" which is misleading.
Basically, that's it!
Have fun
Links: