digitalmars.D.learn - cgi.d - fastcgi - LightTPD is not cooperative
- Sycam_Inc (6/6) Oct 02 2014 This is a cross-post from the issue i started on github (i figure
- Adam D. Ruppe (5/5) Oct 02 2014 Try running the program yourself with a port argument
- Sycam_Inc (15/20) Oct 02 2014 Ok That Worked, but the GenericMain never runs
- Adam D. Ruppe (4/7) Oct 02 2014 What url did you use in the browser and what's your lighttpd
- Sycam_Inc (23/30) Oct 02 2014 Folders
- Adam D. Ruppe (4/4) Oct 03 2014 Hmm, I don't know and don't have it set up on windows to try
This is a cross-post from the issue i started on github (i figure i'll probably get a quicker response here) FastCGI dosen't cooperate with LightTPD on windows. as soon as lighttpd starts up and initializes fastcgi "unknown listenType (0)" is printed out and the server shuts down I've isolated that this is caulsed by the reciveloop on line 2675
Oct 02 2014
Try running the program yourself with a port argument yourprogram.exe --port 3000 for example, then have lighttpd configured to connect to that port for the application. That's what I had to do for nginx on Windows, lighttpd might be the same thing.
Oct 02 2014
On Thursday, 2 October 2014 at 13:25:14 UTC, Adam D. Ruppe wrote:Try running the program yourself with a port argument yourprogram.exe --port 3000 for example, then have lighttpd configured to connect to that port for the application. That's what I had to do for nginx on Windows, lighttpd might be the same thing.Ok That Worked, but the GenericMain never runs module main; //import std.stdio; import arsd.cgi; void Req(Cgi c) { new File("C:/c/a.text").write("hello"); c.write("This is a test"); c.close(); } mixin GenericMain!(Req); when running in the browser the page just continues to load and the lighttpd console shows no output from it and it dosent write anything in the file.
Oct 02 2014
On Thursday, 2 October 2014 at 13:53:48 UTC, Sycam_Inc wrote:when running in the browser the page just continues to load and the lighttpd console shows no output from it and it dosent write anything in the file.What url did you use in the browser and what's your lighttpd config look like? The program might be correct and the config is just off.
Oct 02 2014
On Thursday, 2 October 2014 at 14:17:42 UTC, Adam D. Ruppe wrote:On Thursday, 2 October 2014 at 13:53:48 UTC, Sycam_Inc wrote:Folders C:\c - server folder C:\c\cgi-bin - cgi folder C:\c\cgi-bin\test.exe - cgi file example url: loclahost\cgi-bin\test.exe Relevent Config: server.document-root = "C:\c" fastcgi.debug = 1 fastcgi.server = ( "/cgi-bin/" => ( "localhost" => ( "max-procs" => 1, "bin-path" => server.document-root + "\cgi-bin\Test.exe --port 9000" , "host" => "127.0.0.1", "port" => 9000 ) ) ) p.s. lighttpd exits on the event of a fast-cgi process not startingwhen running in the browser the page just continues to load and the lighttpd console shows no output from it and it dosent write anything in the file.What url did you use in the browser and what's your lighttpd config look like? The program might be correct and the config is just off.
Oct 02 2014
Hmm, I don't know and don't have it set up on windows to try right now. My suggestion is to look for getting it to work with C or C++ - since my cgi.d lib uses a C library, it should work exactly the same way in terms of configuration.
Oct 03 2014