# Need help on fast cgi c++ configuration on windows

**URL:** <https://www.ruby-forum.com/t/need-help-on-fast-cgi-c-configuration-on-windows/229497>\
**Category:** NGINX\
**Created:** [January 24, 2013, 7:24pm UTC](https://www.ruby-forum.com/t/need-help-on-fast-cgi-c-configuration-on-windows/229497 "2013-01-24T19:24:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 24, 2013, 7:24pm UTC](https://www.ruby-forum.com/t/need-help-on-fast-cgi-c-configuration-on-windows/229497/1 "2013-01-24T19:24:26Z")

</div>

Hi everyone  
I am new to nginx so really need u r help

My problem is that i set up niginx server on windows and it runs very  
well  
. But i want to run c++ programs i.e(.exe)  
so i come accross fast-cgi lib then i compiled source successfully now i  
have fast cgi wraper for .exe ie. cgi-fcgi.exe

now i changed in nginx.conf as

location ~ /fcgi/$ {  
include fastcgi\_params;  
fastcgi\_pass 127.0.0.1:3000;  
}

and running it as [http://localhost/fcgi/](http://localhost/fcgi/) in browser

it not working so i checked error log and i found  
upstream prematurely closed connection

so any guess  
thanks in advance

Posted at Nginx Forum:

> **[Need help on fast cgi c++ configuration on windows](https://forum.nginx.org/read.php?2,235556,235556#msg-235556)**
>
> Hi everyone I am new to nginx so really need u r help My problem is that i set up niginx server on windows and it runs very well . But i want to run c++ programs i.e(.exe) so i come accross fast-cgi lib then i compiled source successfully now i have...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 25, 2013, 7:33am UTC](https://www.ruby-forum.com/t/need-help-on-fast-cgi-c-configuration-on-windows/229497/2 "2013-01-25T07:33:12Z")

</div>

Check your fastcgi code. Ensure that it is running properly. Have you  
checked the logs of that process?

On Thu, Jan 24, 2013 at 10:23 AM, removed\_email\_address@domain.invalid \<

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 25, 2013, 11:29am UTC](https://www.ruby-forum.com/t/need-help-on-fast-cgi-c-configuration-on-windows/229497/3 "2013-01-25T11:29:05Z")

</div>

yes i cheked it and now i am able to run it but not using cgi-fcgi.exe  
using anothe wraper  
there is problem in tht code due have any idea about what can be  
problem  
in cgi-fcgi.exe
