Project

General

Profile

[Solved] lighttpd on Linux Yocto - Intel Galileo image

Added by BMEJ about 9 years ago

Greetings,

I am a beginner in the process of trying to enable script executions on my webserver hosted on my intel galileo.

I am running Linux Yocto and lighttpd version 1.4.35. Anytime I enable #mod_cgi on the lighttpd.conf file the webserver goes down. The original image that came with lighttpd may not have been configured to enable cgi. The main challenge here is the directory structure on my OS is quite a bit different that all tutorials I've found online.

Does anyone have experience with this particular distribution and lighty? I'm not sure if cgi is required to do this and am really here to learn things so a nudge in the right direction is greatly appreciated. Perhaps fastcgi or php would be the ideal approach.

where should I look at, other than the lighttpd.conf file to enable server script executions from the web?

Thanks


Replies (3)

RE: lighttpd on Linux Yocto - Intel Galileo image - Added by gstrauss about 9 years ago

Have you checked the lighttpd.breakage.log and lighttpd.error.log for clues? Have you tried running ./lighttpd -p -f lighttpd.conf? Does that fail? If so, strace it and see where it fails. Alternatively, if it is crashing, enable core files with: ulimit -c unlimited. Then run ./lighttpd -p -f lighttpd.conf, and if it crashes, load the core in gdb and get a stack trace where it crashed. Any of those would be helpful in tracking the problem down. Thanks.

RE: lighttpd on Linux Yocto - Intel Galileo image - Added by BMEJ about 9 years ago

Thanks for the response.

so I don't have a lighttpd folder. The lighttpd.conf file is in my /etc/ directory. I've tried running that ./lighttpd -p -f lighttpd.con

I actually can't find a file called lighttpd or any lighttpd folders.

However, I have a website hosted in the /www folder and have edited the lighttpd.conf file.

The systemctl command shows that the lighttpd service is running.

So i edited the /etc/lighttpd.conf file and removed the # for "mod_cgi" then restart the service and website goes down. Here is the errorlog of that. Its' really long so I've attached it. Heres the first few lines anway

2016-02-29 07:49:12: (/home/pokybuild/yocto-autobuilder/yocto-worker/quark-multilib/build/build/tmp/work/i586-
poky-linux/lighttpd/1.4.35-r1/lighttpd-1.4.35/src/server.c.1558) server stopped by UID = 0 PID = 1
2016-02-29
07:50:38: (/home/pokybuild/yocto-autobuilder/yocto-worker/quark-multilib/build/build/tmp/work/i586-poky-
linux/lighttpd/1.4.35-r1/lighttpd-1.4.35/src/log.c.164) server started
2016-02-29 07:50:38:
(/home/pokybuild/yocto-autobuilder/yocto-worker/quark-multilib/build/build/tmp/work/i586-poky-
linux/lighttpd/1.4.35-r1/lighttpd-1.4.35/src/server.c.1045) WARNING: unknown config-key: cgi.assign (ignored)

It's probably something to do with the intel galileo linux image im using having being built without cgi-support, but like i said i'm a noob in the grand scheme of things. I will probably end up trying some other method to run scripts on the server rather then rebuild my entire sd-card image.

thanks

RE: lighttpd on Linux Yocto - Intel Galileo image - Added by gstrauss about 9 years ago

unknown config-key: cgi.assign (ignored)

would indicate that mod_cgi module is not loaded. Please check your config.

My test commands above should be modified to your binary and config file locations.

$ which lighttpd # and use this path as "/path/to/lighttpd" below
$ /path/to/lighttpd -p -f /etc/lighttpd.conf

If you can take the website down (off hours) via stopping it with systemctl, then you can then load lighttpd in the foreground to see if you get any errors to console.
$ /path/to/lighttpd -D -f /etc/lighttpd.conf # Ctrl-C will stop this web server and then you can restart under systemctl

    (1-3/3)