From: Nikos <ni...@ma...> - 2004-12-30 10:03:37
|
RJ Ent. wrote: > >Got the error Bad Request >while trying to obtain /cgi-bin/test.cgi. >couldn't execute >"/pathToLaunchLocation/tclhttpd3.5.1.kit/bin/../htdocs/cgi-bin/test.cgi": >not a directory > > Hi, Here I believe your cgi's are in the kit, so the filesystem does not know about vfs... >Got the error Bad Request >while trying to obtain /guestbook/guestbook.cgi. >couldn't execute >"/pathToLaunchLocation/tclhttpd3.5.1.vfs/htdocs/guestbook/guestbook.cgi": >permission denied > > Besides the fact of having executables under your document root, here I believe that you need to register the cgi directory with "Cgi_Directory url_directory physical_directory" Check execute permissions? >Could someone be so kind as to shed some light on what I am doing incorrect? > >Many thanks. > > Below is an old script we used to use when we could not avoid cgi's in the kit... proc cgikit::map_cgi {cgi_tmp_dir wrapped_dir} { #wrapped_dir is what is the cgi directory actually is # check to see if running as a starkit if {[info exists starkit::topdir]} { if {[info procs ::Httpd_Server] ne ""} { set cgi_source [file join $::Config(docRoot) $wrapped_dir] set cgi_dest [file join $::env(TMP) $cgi_tmp_dir] file copy $cgi_source $cgi_dest Cgi_Directory /$cgi_tmp_dir $cgi_dest set ::Httpd(starkit_cgi_dir) $cgi_dest #register callback on exit Httpd_RegisterShutdown cgikit::cgi_cleanup return "$wrapped_dir directory remapped to /$cgi_tmp_dir" } } } proc cgikit::cgi_cleanup {} { ###exiting tclhttpd via the SrvUI calls this proc ###What to do if exiting from shell, or Control-C??? if {[info exists starkit::topdir]} { if {[info procs ::Httpd_Server] ne ""} { eval file delete -force $::Httpd(starkit_cgi_dir) } } } So on startup of tclhttpd, we call map_cgi, and exit, cgi_cleanup... regards, nicolas boretos >---------- >RJEnt. - Linux Solutions & Consulting > > >------------------------------------------------------- >The SF.Net email is sponsored by: Beat the post-holiday blues >Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. >It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt >_______________________________________________ >TclHttpd-users mailing list >Tcl...@li... >https://lists.sourceforge.net/lists/listinfo/tclhttpd-users > > |