mamcxyz
2006-06-10 18:36:53 UTC
I'm triying to use lighttpd for Windows, so I can test stuff localy and
then upload to linux.
I download the windows version of lighttpd :
http://www.kevinworthington.com:8181/
I configure the thing this way:
server.modules = ( "mod_rewrite", "mod_fastcgi" )
server.document-root = "F:/Proyectos/jhonWeb"
server.indexfiles = ( "index.html", "index.htm", "default.htm" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
# you might want to set this to something differently
# if your apache isn't running on port 80 - if your lighttpd
# is running behind some other server, you want to put in some
# other port and change the IP to 127.0.0.1.
server.port = 81
server.bind = "127.0.0.1"
server.tag = "lighttpd/1.4.11 (Win32)"
server.errorlog = "C:/lighttpd/logs/lighttpd.error.log"
fastcgi.server = (
"/main.fcgi" => (
"main" => (
** I try:
"socket" => "F:\Proyectos\jhonWeb\main.fcgi" also
"host" => "127.0.0.1" ,
"port" => 82 ,
"bin-path" =>
"D:\Programacion\Python\Python24\python.exe
F:\Proyectos\jhonWeb\main.fcgi",
"check-local" => "disable"
)
),
"/admin.fcgi" => (
"admin" => (
"socket" =>
"F:\Proyectos\jhonWeb\main.fcgi",
"check-local" => "disable"
)
)
)
url.rewrite = (
"^(/admin/.*)$" => "/admin.fcgi$1",
"^(/r/.*)$" => "/admin.fcgi$1",
"^(/buscar/.*)$" => "/main.fcgi$1",
"^(/restaurantes/.*)$" => "/main.fcgi$1",
"^(/etiquetas/.*)$" => "/main.fcgi$1"
)
*** mimetype stuff here
My main.fcgi
import sys
sys.path +=
['D:\\Programacion\\Python\\Python24\\Lib\\site-packages\\django\\']
sys.path += ['F:\\Proyectos\\jhonWeb\\']
from flup.server.fcgi import WSGIServer
from django.core.handlers.wsgi import WSGIHandler
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'jhonWeb.settings'
def main():
WSGIServer(WSGIHandler()).run()
if __name__ == '__main__':
main()
With "socket" say:
connect failed: Bad file descriptor on
unix:F:\Proyectos\jhonWeb\main.fcgi
I think this ocket thing mut be a *nix thing so...
With port + ip
(mod_fastcgi.c.3298) fcgi: got a FDEVENT_ERR. Don't know why.
And I get blank pages
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
then upload to linux.
I download the windows version of lighttpd :
http://www.kevinworthington.com:8181/
I configure the thing this way:
server.modules = ( "mod_rewrite", "mod_fastcgi" )
server.document-root = "F:/Proyectos/jhonWeb"
server.indexfiles = ( "index.html", "index.htm", "default.htm" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
# you might want to set this to something differently
# if your apache isn't running on port 80 - if your lighttpd
# is running behind some other server, you want to put in some
# other port and change the IP to 127.0.0.1.
server.port = 81
server.bind = "127.0.0.1"
server.tag = "lighttpd/1.4.11 (Win32)"
server.errorlog = "C:/lighttpd/logs/lighttpd.error.log"
fastcgi.server = (
"/main.fcgi" => (
"main" => (
** I try:
"socket" => "F:\Proyectos\jhonWeb\main.fcgi" also
"host" => "127.0.0.1" ,
"port" => 82 ,
"bin-path" =>
"D:\Programacion\Python\Python24\python.exe
F:\Proyectos\jhonWeb\main.fcgi",
"check-local" => "disable"
)
),
"/admin.fcgi" => (
"admin" => (
"socket" =>
"F:\Proyectos\jhonWeb\main.fcgi",
"check-local" => "disable"
)
)
)
url.rewrite = (
"^(/admin/.*)$" => "/admin.fcgi$1",
"^(/r/.*)$" => "/admin.fcgi$1",
"^(/buscar/.*)$" => "/main.fcgi$1",
"^(/restaurantes/.*)$" => "/main.fcgi$1",
"^(/etiquetas/.*)$" => "/main.fcgi$1"
)
*** mimetype stuff here
My main.fcgi
import sys
sys.path +=
['D:\\Programacion\\Python\\Python24\\Lib\\site-packages\\django\\']
sys.path += ['F:\\Proyectos\\jhonWeb\\']
from flup.server.fcgi import WSGIServer
from django.core.handlers.wsgi import WSGIHandler
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'jhonWeb.settings'
def main():
WSGIServer(WSGIHandler()).run()
if __name__ == '__main__':
main()
With "socket" say:
connect failed: Bad file descriptor on
unix:F:\Proyectos\jhonWeb\main.fcgi
I think this ocket thing mut be a *nix thing so...
With port + ip
(mod_fastcgi.c.3298) fcgi: got a FDEVENT_ERR. Don't know why.
And I get blank pages
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-***@googlegroups.com
To unsubscribe from this group, send email to django-users-***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---