Jan Kneschke | 8 Jun 2008 17:08
Picon
Gravatar

Mailinglists are moved

Dear lighties,

thanks to darix the mailing-lists have a new home now and all previous 
subscribers are added to the new mailing-lists:

* lighttpd <at> lists.lighttpd.net
* lighttpd-announce <at> lists.lighttpd.net
* lighttpd-dev <at> lists.lighttpd.net

The prefixes are the same, just the domain is now  <at> lists.lighttpd.net 
instead of  <at> lists.kneschke.de.

Sorry, that it took so long to bring up the mailing lists again.

cheers,
   Jan
--

-- 
  jan: "Gee, Brain^WEric, what'd you wanna do tonight?"
eric: Same thing we do everynight: Take over the HelloWorld!

Jack L | 14 Jun 2008 20:06
Picon
Favicon

Start up script for lighttpd?

Hi all,

I'm so not good at Unix stuff - a while ago I got a copy of the
/etc/init.d/lighttpd from someone on this list but I lost it.

I tried modifying from another file myself. Somehow it doesn't
start the back end process (Python FCGI) properly. The Python
back-end somehow can not find some modules. But if I run the
same command /usr/local/sbin/lighttpd -f /etc/lighttpd.conf,
it works just fine.

Can anyone help point out what I'm doing wrong? Below is the file.

--

-- 
Best regards,
Jack

#!/bin/sh
#
# chkconfig: - 85 15
# description: Startup script for the lighttpd server
#
# processname: lighttpd
# config: /etc/lighttpd.conf
# pidfile: /var/run/lighttpd.pid

# Source function library
.. /etc/rc.d/init.d/functions

appname="lighttpd"
(Continue reading)

Christian Kujau | 14 Jun 2008 23:04
Picon

Re: Start up script for lighttpd?

On Sat, 14 Jun 2008, Jack L wrote:
> I tried modifying from another file myself. Somehow it doesn't
> start the back end process (Python FCGI) properly.

The script you sent just starts lighttpd, not the backend process.

> The Python back-end somehow can not find some modules.

What's the exact error message here?

C.
--

-- 
BOFH excuse #306:

CPU-angle has to be adjusted because of vibrations coming from the nearby road

Jack L | 14 Jun 2008 23:40
Picon
Favicon

Re[2]: Start up script for lighttpd?

Hello Christian,

In my case, lighttpd starts the fastcgi process automatically.
The exact error:

[root <at> server init.d]# Traceback (most recent call last):
  File "/web/webapp.py", line 4, in ?
    import web
ImportError: No module named web
2008-06-14 17:38:27: (mod_fastcgi.c.1025) the fastcgi-backend /web/webapp.py failed to start:
2008-06-14 17:38:27: (mod_fastcgi.c.1029) child exited with status 1 /web/webapp.py
2008-06-14 17:38:27: (mod_fastcgi.c.1032) If you're trying to run PHP as a FastCGI backend, make sure
you're using the FastCGI-enabled version.
You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output,
NOT '(cgi)' NOR '(cli)'.
For more information, check
http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI#preparing-php-as-a-fastcgi-programIf
this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2008-06-14 17:38:27: (mod_fastcgi.c.1336) [ERROR]: spawning fcgi failed.
2008-06-14 17:38:27: (server.c.895) Configuration of plugins failed. Going down.

--

-- 
Best regards,
Jack

Saturday, June 14, 2008, 2:04:22 PM, you wrote:

> On Sat, 14 Jun 2008, Jack L wrote:
>> I tried modifying from another file myself. Somehow it doesn't
>> start the back end process (Python FCGI) properly.
(Continue reading)

Jack L | 15 Jun 2008 10:31
Picon
Favicon

Re[3]: Start up script for lighttpd?

I found out that somehow when run from /etc/init.d/lighttpd,
a wrong version of Python is invoked.

-- 
Best regards,
Jack

Saturday, June 14, 2008, 2:40:38 PM, you wrote:

> Hello Christian,

> In my case, lighttpd starts the fastcgi process automatically.
> The exact error:

> [root <at> server init.d]# Traceback (most recent call last):
>   File "/web/webapp.py", line 4, in ?
>     import web
> ImportError: No module named web
> 2008-06-14 17:38:27: (mod_fastcgi.c.1025) the fastcgi-backend /web/webapp.py failed to start:
> 2008-06-14 17:38:27: (mod_fastcgi.c.1029) child exited with status 1 /web/webapp.py
> 2008-06-14 17:38:27: (mod_fastcgi.c.1032) If you're trying to run
> PHP as a FastCGI backend, make sure you're using the FastCGI-enabled
> version.
> You can find out if it is the right one by executing 'php -v' and
> it should display '(cgi-fcgi)' in the output, NOT '(cgi)' NOR
> '(cli)'.
> For more information, check
> http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI#preparing-php-as-a-fastcgi-programIf
> this is PHP on Gentoo, add 'fastcgi' to the USE flags.
> 2008-06-14 17:38:27: (mod_fastcgi.c.1336) [ERROR]: spawning fcgi failed.
(Continue reading)

Christian Kujau | 15 Jun 2008 20:59
Picon

Re[2]: Start up script for lighttpd?

On Sat, 14 Jun 2008, Jack L wrote:
> [root <at> server init.d]# Traceback (most recent call last):
>  File "/web/webapp.py", line 4, in ?
>    import web
> ImportError: No module named web

There seems to be an error in webapp.py, not much lighttpd can do about 
it. Maybe you're better off asking this on a python-* list.

C.
--

-- 
BOFH excuse #161:

monitor VLF leakage

Darren Garvey | 17 Jun 2008 20:41
Picon

[fastcgi] Using FastCGI with C/C++

Hi all,

I've tried to get some FastCGI code of mine working with lighttpd several times in the past, but always without luck. I've been trying again recently and I'm really stuck, having exhausted as much of google as I have time to wade through.

The aim is to be able to get lighty to start up the relevant process given a name in a special directory.
ie.
a request for /fcgi/echo    -> starts up the 'echo' app in /usr/lib/fcgi-bin
a request for /fcgi/whatever -> starts up /usr/lib/fcgi-bin/whatever
etc...

As it stands I'm struggling to figure out how lighty actually deals with fastcgi stuff in general - I've briefly looked at the source, but not for long enough. ;-) The above use-case seems to be moot in the face of things like FastCGI-PHP, but hopefully it's not impossible.

I've attached the relevant part of my config that is as close to working as possible. With that, lighty starts up the processes as expected, but doesn't forward anything to them. Directing my browser to /fcgi/linux_fcgi just gives an error 404.

I'm working on both linux and windows (with the latest stable lighty, sometimes with SVN lighty) , although linux is my focus for now since I hear windows fastcgi support is very fickle (is this true?). I'm implementing a FastCGI library, so it should work with unix sockets/named pipes and tcp, both locally and remotely. AFAICT, the library works fine once it's connected to the server (it works with Apache), but connecting is proving to be a pain. Any pointers here would be very much appreciated.

Apologies for the lack of concrete details, I can provide any extra information that would be helpful.

Cheers,

Darren

Attachment (10-fastcgi.conf): application/octet-stream, 1106 bytes
Perry Clarke | 29 Jun 2008 03:00
Favicon

Conditional Config Ordering

I don't understand some of the ordering dependencies in the  
conditional configuration stuff.  I'm using lighttpd 1.4.19.

For example, this first method doesn't work ("server.error- 
handler-404" is never set):

> $HTTP["url"] =~ "^/foobar/" {
>    $HTTP["useragent"] != "my-ua-str" {
>        server.error-handler-404 = "/foobar/req_error_handler.php"
>    }
> }

while merely swapping the order of the clauses makes it work  
correctly depending on the incoming request:

> $HTTP["useragent"] != "my-ua-str" {
>    $HTTP["url"] =~ "^/foobar/" {
>        server.error-handler-404 = "/foobar/req_error_handler.php"
>    }
> }

There are times when one order is much more convenient than another  
so it would be better if ordering wasn't such an issue (this is just  
one example, I've tripped over similar ordering issues several times).

Is there logic behind this that isn't obvious?

Perry


Gmane