I just received my new GL-USB150. I am very impressed with it! Unfortunately though, I quickly encountered a problem upon upgrading it.
The web ui said I was running 2.something (i think 2.25?) and said that version 3.0 was available. I naturally clicked upgrade! After the upgrade, the webserver never came back online.
Fortunately the nice people at GL-iNet allow users root access via SSH! After some investigation, i determined that lighttpd was unable to start. Starting it with the -D option showed this error:
root@GL-USB150:~# /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -D
2018-01-27 12:53:46: (log.c.194) server started
2018-01-27 12:53:46: (mod_fastcgi.c.1102) the fastcgi-backend /www/cgi-bin/download_file failed to start:
2018-01-27 12:53:46: (mod_fastcgi.c.1106) child exited with status 2 /www/cgi-bin/download_file
2018-01-27 12:53:46: (mod_fastcgi.c.1109) If youâre trying to run your app as a FastCGI backend, make sure youâre using the FastCGI-enabled version.\nIf this is PHP on Gentoo, add âfastcgiâ to the USE flags.
2018-01-27 12:53:46: (mod_fastcgi.c.1396) [ERROR]: spawning fcgi failed.
2018-01-27 12:53:46: (server.c.1025) Configuration of plugins failed. Going down.
Further investigation revealed that the the overlay filesystem from before the upgrade contained an old version of the config file, so the 3.0 upgradeâs version in /rom was being masked:
â overlay/upper/etc/lighttpd/lighttpd.conf 2017-06-06 03:16:48.000000000 +0000
+++ rom/etc/lighttpd/lighttpd.conf 2017-07-07 11:42:25.000000000 +0000
@@ -1,5 +1,5 @@
version must be the same as /etc/glconfig
-# version=2.25
+# version=3.0
server.modules = (
)
@@ -29,26 +29,6 @@
server.upload-dirs = ( â/tmpâ )
-fastcgi.server = (
- â/cgi-bin/download_fileâ => (
- âdownload_file.handlerâ => (
- âsocketâ => âdownload_file.socketâ,
- âcheck-localâ => âdisableâ,
- âbin-pathâ => â/www/cgi-bin/download_fileâ,
- âmax-procsâ => 1,
- âallow-x-send-fileâ => âenableâ
- )
- ),
-# â/htmlâ => (
-# âhtml.handlerâ => (
-# âsocketâ => â/tmp/html.socketâ,
-# âcheck-localâ => âdisableâ,
-# âbin-pathâ => â/www/htmlâ,
-# âmax-procsâ => 1,
-# âallow-x-send-fileâ => âenableâ
-# )
-# )
-)
CGI module
#cgi.assign = ( â.plâ => â/usr/bin/perlâ, â.cgiâ => â/usr/bin/perlâ )
$HTTP[âurlâ] =~ â^/cgi-bin/â {
The solution then, which worked for me and hopefully will be helpful to others who upgrade their GL-USB150 to version 3.0 and find that they cannot access its web interface, is to ssh to the device (ssh root@192.168.8.1) using the password set before the upgrade, and then run this command:
cp /rom/etc/lighttpd/lighttpd.conf /etc/lighttpd/
Then you can start the webserver with /etc/init.d/lighttpd restart
(or just restart the device and it will come up).
Thanks to GL-iNet for making this awesome device!
ps: Although I am quite impressed by the stock firmware, I expect Iâll probably switch to running LEDE on it soon enough, if for no other reason because I think they have a 4.4 kernel instead of the 3.18.27 kernel GL-iNet is shipping