Welcome! Log In Create A New Profile

Advanced

Re: How to use C as a scripting language?

James Fidell
December 03, 2011 05:32AM
On 03/12/11 07:38, etrader wrote:
> I am using php in nginx. I wonder how can I modify nginx configuration
> to work with C too. Considered a simple c file (hello.c and compiled as
> a.out) with printf of
>
> printf("Content-type: text/html\r\nStatus: 200 OK\r\n\r\n");
> printf("Hello World");
>
> how can I display Hello World by browsing the compiled version on
> localhost/a.out

The best solution probably depends on what you're trying to achieve and
your particular circumstances. As well as the solutions already
suggested, one method I've used is to build the C program against
libevent, effectively using libevent to build a mini webserver that is
running all the time. nginx can then use that as an upstream proxy.

James

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to use C as a scripting language?

etrader December 03, 2011 02:38AM

Re: How to use C as a scripting language?

António P. P. Almeida December 03, 2011 03:52AM

Re: How to use C as a scripting language?

James Fidell December 03, 2011 05:32AM

Re: How to use C as a scripting language?

etrader December 03, 2011 07:44AM

Re: How to use C as a scripting language?

James Fidell December 03, 2011 08:14AM

Re: How to use C as a scripting language?

Oleksandr V. Typlyns'kyi December 03, 2011 08:32AM

Re: How to use C as a scripting language?

Valentin V. Bartenev December 03, 2011 08:34AM

Re: How to use C as a scripting language?

roberto December 03, 2011 09:14AM

Re: How to use C as a scripting language?

Brian Akins December 03, 2011 09:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready