> If you want to use SCGI instead of FastCGI: 
> http://www.neilvandyke.org/racket-scgi/

I am trying with lighttpd. I placed the following example on 
/home/lux/served/scgi-test/scgi.rtk:

----------------------------------------------------------
#lang racket

(require (planet neil/scgi:2:3))
 
(cgi #:startup  (lambda ()
                  (printf "Startup for cgi-type ~S..."
                          (cgi-type)))
 
     #:request  (lambda ()
                  (display "Content-type: text/html\r\n\r\n")
                  (display "<p>Hello, world!</p>")
                  (printf "<p>Your IP address is: ~S</p>"
                          (cgi-remote-addr)))
 
     #:shutdown (lambda ()
                  (printf "Shutdown down for cgi-type ~S..."
                          (cgi-type))))
----------------------------------------------------------

I have the following lighttpd configuration (which permit me to use .rkt files, 
excluding your example, as normal CGI):

----------------------------------------------------------
server.modules = (
        "mod_access",
        "mod_alias",
        "mod_compress",
        "mod_redirect",
        "mod_cgi",
        "mod_scgi",
#       "mod_rewrite",
)

server.document-root        = "/home/lux/served"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 80

index-file.names            = ( "index.rkt", "index.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".rkt" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", 
"text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

cgi.assign = ( ".rkt" => "/usr/bin/racket" )

scgi.server = ( ".rkt" => ((
                "bin-path" => "/usr/bin/racket",
                "socket" => "/tmp/racket.socket"
              )))

scgi.debug = 1
----------------------------------------------------------

Trying to get: http://localhost/scgi-test/scgi.rkt
Result in: 500 - Internal Server Error

I think I miss something important here...

error.log report a long list of line like this:

----------------------------------------------------------
2015-04-03 11:42:50: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-1 1 1 0 
28211 
2015-04-03 11:42:50: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-0 1 1 0 
28208 
2015-04-03 11:42:51: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-3 1 1 0 
28215 
2015-04-03 11:42:51: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-2 1 1 0 
28213 
2015-04-03 11:42:51: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-1 1 1 0 
28211 
2015-04-03 11:42:51: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-0 1 1 0 
28208 
2015-04-03 11:42:52: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-3 1 1 0 
28215 
2015-04-03 11:42:52: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-2 1 1 0 
28213 
2015-04-03 11:42:52: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-1 1 1 0 
28211 
2015-04-03 11:42:52: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-0 1 1 0 
28208 
2015-04-03 11:42:53: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-3 1 1 0 
28215 
2015-04-03 11:42:53: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-2 1 1 0 
28213 
2015-04-03 11:42:53: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-1 1 1 0 
28211 
2015-04-03 11:42:53: (mod_scgi.c.2086) proc:  0 /tmp/racket.socket-0 1 1 0 28208
----------------------------------------------------------

Do you see something?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to