What's new

Entware cgi-bin support (apcupsd-cgi)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

gpz1100

Regular Contributor
Rt-ac68u
Firmware 380.68_4

Baby steps here.

Got the rt to recognize the ups, and apcupsd configured to communicate with it.

Next step is the apcupsd-cgi module so status can be viewed via web page.

1) apcupsd-cgi is installed properly
2) lighttpd installed following the guide here - https://github.com/RMerl/asuswrt-merlin/wiki/Lighttpd-web-server-with-PHP-support-through-Entware

3) Yet instead of running the .cgi file, the browser wants to download it. I have a feeling something is missing or misconfigured.

What is the proper way to get cgi-bin functionality?

Thanks!
 
Last edited:
Hello,

I know this thread is over a year old but I wanted to post the solution to resolve this for others that may be interested in getting a web view of their UPS stats.

After completing steps 1 and 2 from post #1, do the following:

Install lighttpd-mod-cgi

Code:
opkg install lighttpd-mod-cgi

Open /opt/etc/lighttpd/lighttpd.conf using nano.

Add ".cgi" to the line that starts with static-file.exclude-extensions. It should like the line below:

Code:
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi" )

Save the file.

Open /opt/etc/lighttpd/conf.d/30-cgi.conf

Modify the line that starts with ".cgi" to the following:

Code:
 ".cgi" => "",

Save the file.

Restart lighttpd

Code:
/opt/etc/init.d/S80lighttpd restart

The .cgi files should load correctly (ex. http://192.168.1.1:81/cgi-bin/apcupsd/multimon.cgi)

I hope this helps others.
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top