Jack L | 14 Jun 20:03

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 23:04

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 23:40

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 10:31

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 20:59

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


Gmane