Modify

Opened 6 years ago

Last modified 4 years ago

#10515 new enhancement

make luci-sgi-uhttpd a first-class replacement for luci-sgi-cgi

Reported by: matthias_berndt@… Owned by:
Priority: normal Milestone: Barrier Breaker 14.07
Component: luci Version: Trunk
Keywords: Cc:

Description

Hi,

On my WRT54G, luci in its default configuration, i. e. when connected to uhttpd via CGI, runs staggeringly slowly. I was able to make it run at a tolerable speed by using luci-sgi-uhttpd instead, but it was harder to make it work than it should be.

  • luci-sgi-cgi contains /www/index.html which forwards to /cgi-bin/luci. An equivalent file is missing in luci-sgi-uhttpd.
  • luci-lib-web depends on luci-sgi-cgi, even though it's not needed when using luci-sgi-uhttpd
  • uhttpd needs to be reconfigured

I propose the following changes:

  • add a virtual package named luci-sgi that is provided by luci-sgi-uhttpd and luci-sgi-cgi
  • make luci-lib-web depend on luci-sgi instead of luci-sgi-cgi
  • add a /www/index.html file to luci-sgi-uhttpd that forwards to /luci
  • add a conflict between luci-sgi-cgi and luci-sgi-uhttpd, as they now both contain /www/index.html
  • add a post-install script to the luci-sgi-uhttpd package that'll change the uhttpd configuration appropriately, i. e. something along the lines of
    # avoid clobbering an existing configuration
    if ! uci get uhttpd.main.lua_prefix && ! uci get uhttp.main.lua_handler
    then
      uci batch << EOF
    set uhttpd.main.lua_handler=/usr/lib/lua/luci/sgi/uhttpd.lua
    set uhttpd.main.lua_prefix=/luci
    EOF
    fi
    

Also, perhaps luci-sgi-uhttpd should be made the default, as CGI is just too slow.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.