Project

General

Profile

Does *anyone* have lighttpd working with C++ CGI executables?

Added by Anonymous over 16 years ago

Very frustrating -- I can't find any information about getting lighttpd to work with C++ CGI executables. I am having no success myself. If you have this working, please share the details.


Replies (10)

RE: Does *anyone* have lighttpd working with C++ CGI executables? - Added by Anonymous over 16 years ago

I've been trying mod_cgi.

RE: Does *anyone* have lighttpd working with C++ CGI executables? - Added by Olaf-van-der-Spek over 16 years ago

Yes, I have. Using both CGI and FastCGI. What is the problem?

RE: Does *anyone* have lighttpd working with C++ CGI executables? - Added by icy over 16 years ago

Please read this topic before trying to get support: http://redmine.lighttpd.net/boards/2/topics/show/5
You need to provide details on what is not working.

RE: Does *anyone* have lighttpd working with C++ CGI executables? - Added by Anonymous over 16 years ago

Thanks for the help.

I am using Ubuntu 8.04. Here's the problem, apparently.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345554#53
https://bugs.launchpad.net/ubuntu/+source/lighttpd/+bug/292347

I don't (yet) understand the role of the 10-cgi.conf file, but it appears to override -- and break -- the lighttpd.conf file.

RE: Does *anyone* have lighttpd working with C++ CGI executables? - Added by Olaf-van-der-Spek over 16 years ago

I just removed the special case for 127.0.0.1

RE: Does *anyone* have lighttpd working with C++ CGI executables? - Added by Anonymous over 16 years ago

Related question: is it possible to run compiled C++ CGI programs with lighttpd on MS Windows? It would be very useful if I could use lighttpd in Cygwin for developing code to deploy later to a Linux server.

If this is possible, what is the correct cgi.assign mapping? I currently have this:

  1. CGI apps
    alias.url = ("/cgi-bin/" => "/var/www/cgi/")
    $HTTP["url"] =~ "/cgi-bin/" {
    cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "", ".exe" => "", "" => "")
    }

but a browser call to my binary executable sends the file for download instead of executing the file.

RE: Does *anyone* have lighttpd working with C++ CGI executables? - Added by Olaf-van-der-Spek over 16 years ago

I don't know about Lighttpd, but Apache does the trick on Windows. Without Cygwin.

RE: Does *anyone* have lighttpd working with C++ CGI executables? - Added by Anonymous over 16 years ago

Yes, so it does -- I can't get lighttpd from Cygwin to work with compiled CGI in Windows, but Apache from Cygwin does work. The useful aspect of Cygwin is that it's an easy way to install the GNU C++ compiler.

    (1-10/10)