Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have strange situation. I need to call a program in cgi-bin from within a perl script. When I try to do that with exec($program), I get

(20014)Internal error: proxy: error reading status line from remote server
proxy: Error reading from remote server returned by ...

The long story... I am calling mapserv ( as a cgi program from OpenLayers ( Ordinarily, my web site is served by Perl Dancer, but the mapserver calls are made directly to http://server/cgi-bin/mapserv from JavaScript. The Dancer web site is served by Starman behind an Apache2 proxy front-end. This is how it looks

[browser] -> http://server/app -> [apache2] -> proxy port 5000 -> Starman
    +-> http://server/cgi-bin/mapserv -> [apache2] -> cgi-bin -> mapserv

This is what I am trying to accomplish

[browser] -> http://server/app -> [apache2] -> proxy port 5000 -> Starman
                               mapserv <-- cgi-bin <-- [apache2] <--+

I saw this question re: 20014 error, but that suggested solution didn't help.

Any other hints?

share|improve this question

I'm not sure which version of Apache are you using. I've had a similar issue with Apache 2.2.22, and Apache's documentation suggests the following:


If this variable is set no pooled connection will be reused if the client connection is an initial connection. This avoids the "proxy: error reading status line from remote server" error message caused by the race condition that the backend server closed the pooled connection after the connection check by the proxy and before data sent by the proxy reached the backend. It has to be kept in mind that setting this variable downgrades performance, especially with HTTP/1.0 clients.

But i'm not sure if that will resolve your issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.