# Not easy replacement of Apache with Ngnix due to error log

**URL:** <https://www.ruby-forum.com/t/not-easy-replacement-of-apache-with-ngnix-due-to-error-log/218477>\
**Category:** NGINX\
**Created:** [April 2, 2012, 6:57am UTC](https://www.ruby-forum.com/t/not-easy-replacement-of-apache-with-ngnix-due-to-error-log/218477 "2012-04-02T06:57:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 2, 2012, 6:57am UTC](https://www.ruby-forum.com/t/not-easy-replacement-of-apache-with-ngnix-due-to-error-log/218477/1 "2012-04-02T06:57:32Z")

</div>

Hi All

```
     I having the html files and cgi files for that I was using the

```

apache, Its running fine.

I heard about the Nginx and I was trying to setup the same in locally  
first. but during that I was getting the error

the error of Nginx not reflect the exact issue with the application.

the error of Nginx is not system admin friendly at all. from the below  
error we are not able to conclude anything.

how to solve the such kind of issue by checking the error log ???

2012/03/30 09:58:05 [error] 29619#0: \*1 upstream closed prematurely  
FastCGI stdout while reading response header from upstream, client:  
192.168.1.44, server: localhost, request: “GET  
/cgi-bin/baybuy\_vendx/index.cgi?vendx\_action=myoffice\_commonuser&userid=53616c7465645f5f1fed4bcaa10a7da569ecb5a53e5a718a&page=1b662ecc4610f940ec530e3bc8762169&BusinessGrID=1  
HTTP/1.1”, upstream: “fastcgi://unix:/var/run/fcgiwrap.socket:”, host:  
“192.168.1.225:90”, referrer:  
“[http://192.168.1.225:90/cgi-bin/baybuy\_vendx/index.cgi?vendx\_action=validate\_both2](http://192.168.1.225:90/cgi-bin/baybuy_vendx/index.cgi?vendx_action=validate_both2)”

Posted at Nginx Forum:

> **[Not easy replacement of Apache with Ngnix due to error log](https://forum.nginx.org/read.php?2,224747,224747#msg-224747)**
>
> Hi All I having the html files and cgi files for that I was using the apache, Its running fine. I heard about the Nginx and I was trying to setup the same in locally first. but during that I was getting the error the error of Nginx not

---

<div class="post-metadata">

**Author:** ![niraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/7ba0ec/32.png) [@niraj](https://www.ruby-forum.com/u/niraj)\
**Post date:** [April 2, 2012, 7:23pm UTC](https://www.ruby-forum.com/t/not-easy-replacement-of-apache-with-ngnix-due-to-error-log/218477/2 "2012-04-02T19:23:00Z")

</div>

On 04/02/12 08:56, niraj wrote:

> the error of Nginx is not system admin friendly at all. from the below  
> error we are not able to conclude anything.

nginx error logs is very friendly and useful.

> how to solve the such kind of issue by checking the error log ???
> 
> 2012/03/30 09:58:05 [error] 29619#0: \*1 upstream closed prematurely  
> FastCGI stdout while reading response header from upstream, client:  
> 192.168.1.44, server: localhost, request: "GET

/cgi-bin/baybuy\_vendx/index.cgi?vendx\_action=myoffice\_commonuser&userid=53616c7465645f5f1fed4bcaa10a7da569ecb5a53e5a718a&page=1b662ecc4610f940ec530e3bc8762169&BusinessGrID=1

> HTTP/1.1", upstream: “fastcgi://unix:/var/run/fcgiwrap.socket:”, host:  
> “192.168.1.225:90”, referrer:

“[http://192.168.1.225:90/cgi-bin/baybuy\_vendx/index.cgi?vendx\_action=validate\_both2](http://192.168.1.225:90/cgi-bin/baybuy_vendx/index.cgi?vendx_action=validate_both2)”

words “upstream closed prematurely FastCGI stdout” show, that problem is  
probably in FastCGI server.

See FastCGI manager error logs, and OS logs (one of usual problem is  
segfault in  
FastCGI process).

–  
Anton Y.

---

<div class="post-metadata">

**Author:** ![niraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/7ba0ec/32.png) [@niraj](https://www.ruby-forum.com/u/niraj)\
**Post date:** [April 3, 2012, 7:48am UTC](https://www.ruby-forum.com/t/not-easy-replacement-of-apache-with-ngnix-due-to-error-log/218477/3 "2012-04-03T07:48:21Z")

</div>

Hi Anton

```
           As u suggested,
           words "upstream closed prematurely FastCGI stdout" show,

```

that problem is  
probably in FastCGI server.

```
              This is what I am telling u that Nginx error log

```

misguide us.

```
          Actually Problem was one perl module was not installed in

```

that so I was getting the above error.

```
 Earlier I used apache so if any module related error then it was

```

reflect in apache’s error log …

that actually not happening with Nginx , this create a problem for  
system admin.

If any idea to get details error logs for nginx then please sugeest.

how to set fcgiwraper error log ???

Posted at Nginx Forum:

> **[Re: Not easy replacement of Apache with Ngnix due to error log](https://forum.nginx.org/read.php?2,224747,224814#msg-224814)**
>
> Hi All I having the html files and cgi files for that I was using the apache, Its running fine. I heard about the Nginx and I was trying to setup the same in locally first. but during that I was getting the error the error of Nginx not

---

<div class="post-metadata">

**Author:** ![niraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/7ba0ec/32.png) [@niraj](https://www.ruby-forum.com/u/niraj)\
**Post date:** [April 3, 2012, 1:14pm UTC](https://www.ruby-forum.com/t/not-easy-replacement-of-apache-with-ngnix-due-to-error-log/218477/4 "2012-04-03T13:14:10Z")

</div>

On 3 April 2012 06:47, niraj [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi Anton
> 
> ```
> As u suggested,
> 
> ```

It’s “you”, not “u”. We’re not teenagers swapping text messages here.

> ```
> words "upstream closed prematurely FastCGI stdout" show,
> 
> ```
> 
> that problem is  
> probably in FastCGI server.
> 
> ```
> This is what I am telling u that Nginx error log
> 
> ```
> 
> misguide us.

No, it told you exactly where to aim your troubleshooting lens. At the  
FCGI process.

> ```
> Actually Problem was one perl module was not installed in
> 
> ```
> 
> that so I was getting the above error.
> 
> ```
> Earlier I used apache so if any module related error then it was
> 
> ```
> 
> reflect in apache’s error log …

That’s because of an architectural decision for Apache to host the  
perl process, and for nginx to outsource it. Each has their advantages  
and disadvantages and both are valid approaches. Learn to use the  
tools in your toolkit.

> that actually not happening with Nginx , this create a problem for  
> system admin.

If your system administrator is unable to configure a debug log from  
your perl process or its FCGI wrapper, after being given the earlier  
information that the problem is _inside_ the FCGI process, then your  
problem is not with nginx: it is with your incompetent system  
administrator.

> If any idea to get details error logs for nginx then please sugeest.
> 
> how to set fcgiwraper error log ???

I don’t know if this thread is useful:  
[http://www.ruby-forum.com/topic/180064](http://www.ruby-forum.com/topic/180064)  
You may have to search for other people’s solutions to getting the  
verbose logs into nginx logs. It appears people have achieved this. I  
don’t have any pertinent information other than what I found searching  
for the problem.

## Jonathan

Jonathan M.  
London, Oxford, UK

> **[Jonathan Matthews :: Words Typed, Great Rates For Cash](https://www.jpluscplusm.com)**

---

<div class="post-metadata">

**Author:** ![niraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/7ba0ec/32.png) [@niraj](https://www.ruby-forum.com/u/niraj)\
**Post date:** [April 3, 2012, 3:25pm UTC](https://www.ruby-forum.com/t/not-easy-replacement-of-apache-with-ngnix-due-to-error-log/218477/5 "2012-04-03T15:25:19Z")

</div>

> I just shared the thing that was happened with me. If error log was  
> informative like apache then It could be the solved earlier.

It was informative. It told you which process was actually having the  
error  
(FastCGI). Nginx should be expected to handle it’s own error messages  
well,  
but if the error is in another process, it only has what that process  
gives  
back to it.

---

<div class="post-metadata">

**Author:** ![niraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/7ba0ec/32.png) [@niraj](https://www.ruby-forum.com/u/niraj)\
**Post date:** [April 4, 2012, 8:15am UTC](https://www.ruby-forum.com/t/not-easy-replacement-of-apache-with-ngnix-due-to-error-log/218477/6 "2012-04-04T08:15:06Z")

</div>

Hi

```
 My view is that only if Nginx error log more informative then it

```

will be very userful for system admin who wants to switch from apache to  
Nginx. Its need to be more informative.

```
 "As I am system admin and I was face that issue and at that time

```

there were no error log which guide me to solve the issue. who are new  
to switch with Nginx this logs not that much informative."

```
 My personal view if Nginx having more informative error log then

```

anybody can easily adopt the Nginx.

Posted at Nginx Forum:

> **[Re: Not easy replacement of Apache with Ngnix due to error log](https://forum.nginx.org/read.php?2,224747,224911#msg-224911)**
>
> Hi All I having the html files and cgi files for that I was using the apache, Its running fine. I heard about the Nginx and I was trying to setup the same in locally first. but during that I was getting the error the error of Nginx not

---

<div class="post-metadata">

**Author:** ![niraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/7ba0ec/32.png) [@niraj](https://www.ruby-forum.com/u/niraj)\
**Post date:** [April 3, 2012, 2:33pm UTC](https://www.ruby-forum.com/t/not-easy-replacement-of-apache-with-ngnix-due-to-error-log/218477/7 "2012-04-03T14:33:35Z")

</div>

Hi

```
First of all sorry for ''u".

I am the system admin. I was stuck when I was getting the above

```

error. I will try to find for the informative error log in Nginx.

I just shared the thing that was happened with me. If error log was  
informative like apache then It could be the solved earlier.

```
  I totally agree with Each has their advantages and disadvantages

```

and both are valid approaches.

Posted at Nginx Forum:

> **[Re: Not easy replacement of Apache with Ngnix due to error log](https://forum.nginx.org/read.php?2,224747,224858#msg-224858)**
>
> Hi All I having the html files and cgi files for that I was using the apache, Its running fine. I heard about the Nginx and I was trying to setup the same in locally first. but during that I was getting the error the error of Nginx not
