OpenWrt Forum Archive

Topic: How are web pages being served in recent trunk?

The content of this topic has been archived on 25 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm running a recent snapshot, r19080, brcm47xx from Friday, Jan 9.  When I do "ps", no httpd appears as it has in the past.  Web pages in /www are still being served.  How is this being done?

root@wl62:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      1368 S    init
    2 root         0 SW<  [kthreadd]
    3 root         0 SW<  [ksoftirqd/0]
    4 root         0 SW<  [events/0]
    5 root         0 SW<  [khelper]
    8 root         0 SW<  [async/mgr]
   26 root         0 SW<  [kblockd/0]
   58 root         0 SW   [pdflush]
   59 root         0 SW   [pdflush]
   60 root         0 SW<  [kswapd0]
   61 root         0 SW<  [aio/0]
   62 root         0 SW<  [crypto/0]
   80 root         0 SW<  [mtdblockd]
  213 root         0 SWN  [jffs2_gcd_mtd3]
  229 root      1368 S    init
  244 root      1372 S    syslogd -C16
  246 root      1356 S    klogd
  260 root       772 S    /sbin/hotplug2 --override --persistent --set-worker /
  420 root      1364 S    udhcpc -t 0 -i eth0.1 -b -p /var/run/eth0.1.pid -O ro
  433 root         0 SW<  [cfg80211]
  514 root         0 SW<  [khubd]
  542 root         0 SW<  [phy0]
  613 root         0 SW<  [scsi_eh_0]
  614 root         0 SW<  [usb-storage]
  768 root         0 SW<  [kjournald]
  851 root      3244 S    lua -lluci.lucid -e luci.lucid.start()
  861 root      1144 S    /usr/sbin/dropbear -p 22 -P /var/run/dropbear.1.pid
  879 root      1352 S    watchdog -t 5 /dev/watchdog
  885 root       832 S    /usr/sbin/ntpclient -i 600 -s -l -D -p 123 -h 0.openw
  886 root      1200 S    /usr/sbin/dropbear -p 22 -P /var/run/dropbear.1.pid
  887 root      1368 S    -ash
  892 root      1360 R    ps

Question 2: What is the "lua -lluci.lucid -e luci.lucid.start()" line for?

You answered your own question, as it turns out tongue


lucid is a webserver written in Lua for the task of serving up LuCI.

>lucid is a webserver written in Lua for the task of serving up LuCI

Great.  Where is this documented?  How does one set up cgi programming, especially with lua scripts?  Are examples available?

Am I correct in thinking that LuCI is not turned on in snapshots?

In this thread, jow says "The lucid daemon does not support cgi binaries currently. You can revert to busybox httpd by disabling the lucid init script and reenabling the httpd one."  https://forum.openwrt.org/viewtopic.php?id=22783

I lost a day over this unannounced change in the basic behavior of openWrt.  None of the other three "General Kamikaze" threads which mention lucid constitute an announcement.  It would be nice if as fundamental a change to openWrt startup as this were announced.

>Subscribe at https://lists.openwrt.org/mailman/listi … rt-commits

Thanks for the suggestion, but I really don't need to know what the vast number of commits are doing, and it would be a full-time job to understand each of them and their possible impact.  But if something changes in the "ps" listing immediately after login, it is likely to be of broad interest, and in the name of sharing the knowledge I would say should be announced in this forum--General Discussions (Kamikaze).

(Last edited by lizby on 11 Jan 2010, 16:15)

lizby wrote:

In this thread, jow says "The lucid daemon does not support cgi binaries currently. You can revert to busybox httpd by disabling the lucid init script and reenabling the httpd one."  https://forum.openwrt.org/viewtopic.php?id=22783

I lost a day over this unannounced change in the basic behavior of openWrt.  None of the other three "General Kamikaze" threads which mention lucid constitute an announcement.  It would be nice if as fundamental a change to openWrt startup as this were announced.

Things have been this way for quite some time, the best workaround may be to run both, but on different ports.  Then OpenWrt can still serve your usual web pages, and the luci interface is still available.

I think the suggestion here is still valid:  https://forum.openwrt.org/viewtopic.php?id=18045

The discussion might have continued from here.