Ich versuche eine Colubrid Applikation unter lighttpd zu nutzen. Ich steh aber irgendwie auf der Leitung. Im Netz finden sich dafür kaum Anleitungen(oder ich verstehe sie nicht)
Ich habs mit folgender Konfiguration versucht.
Ich bin über jede Hilfe Dankbar.
lighttpd.conf
Code: Alles auswählen
server.document-root = "/home/monocult/web"
server.modules = ("mod_fastcgi")
fastcgi.server = ( "/" =>
(( "socket" => "/tmp/fastcgi.socket",
"bin-path" => "/home/monocult/web/handler.fcgi"
))
)
Code: Alles auswählen
#!/usr/bin/python
# -*- coding: utf-8 -*-
from flup.server.fcgi import WSGIServer
from index import MyApplication
WSGIServer(MyApplication).run()
Code: Alles auswählen
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from colubrid import BaseApplication, HttpResponse, execute
class MyApplication(BaseApplication):
def process_request(self):
name = self.request.args.get('name', 'World')
response = HttpResponse('Hello %s!' % name)
response['Content-Type'] = 'text/plain'
return response
app = MyApplication
if __name__ == '__main__':
execute(app)
Code: Alles auswählen
monocult@metropolis:~$ sudo /etc/init.d/lighttpd restart
* Stopping web server lighttpd [ OK ]
* Starting web server lighttpd [ OK ]
monocult@metropolis:~$ 2007-04-23 10:51:29: (mod_fastcgi.c.1032) the fastcgi-backend /home/monocult/web/handler.fcgi failed to start:
2007-04-23 10:51:29: (mod_fastcgi.c.1036) child exited with status 9 /home/monocult/web/handler.fcgi
2007-04-23 10:51:29: (mod_fastcgi.c.1039) if you try do run PHP as FastCGI backend make sure you use 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://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program
2007-04-23 10:51:29: (mod_fastcgi.c.1044) If this is PHP on Gentoo add fastcgi to the USE flags
2007-04-23 10:51:29: (mod_fastcgi.c.1340) [ERROR]: spawning fcgi failed.
2007-04-23 10:51:29: (server.c.849) Configuration of plugins failed. Going down.