1

I am getting below error while trying to do some access website url.

     The proxy server received an invalid response from an upstream server. 
     The proxy server could not handle the request GET /abcef/report.  Reason: Error reading from remote server  Apache/2.2.15 (Red Hat) Server at www.abc.nl  Port 80  

I am confused because same is working when i hit the IP address directly and try to access the url. Anybody can help me to sort this issue. I have goggle for this issue and came to know the issue might be with the vhost.conf file. We are using the ajp transfer using mod_jk to redirect from port 8080 to port 80 and vice versa files used are mod_jk.conf and/etc/httpd/conf/worker .properties. the name of the worked property ajp13 as defined below will be used in the virtual host configuration worker.list=ajp13

I have added some modifications to the files and try to verify but nothing is working. Below is my vhosts.conf file:

NameVirtualHost *:80
<VirtualHost *:80>
ServerName aa.bb.cc.dd
<ifModule mod_headers.c> 
Header set Connection keep-alive 
</ifModule>
RewriteEngine on ....

Please find the httpd.conf file

ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
 TraceEnable off
 <IfModule prefork.c>
 StartServers       20
 MinSpareServers    5
 MaxSpareServers    100
 ServerLimit      512
 MaxClients       512
 MaxRequestsPerChild  0
 </IfModule>
<IfModule worker.c>
StartServers         4
MaxClients         300
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

mod_jk file:

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogLevel info
JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /zwr* ajp13

workers.properties:

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.socket_keepalive=true
worker.ajp13.connection_pool_size=10000
worker.ajp13.connect_timeout=5000000
worker.ajp13.prepost_timeout=5000000
4
  • Have you tried this? serverfault.com/questions/185894/…
    – Diamond
    Commented Nov 27, 2015 at 11:21
  • @bangal In my case i am not having any ProxyPass entry in conf field. should i create one in httpd.conf file or in vhosts.conf file
    – ganesh abh
    Commented Nov 27, 2015 at 11:57
  • Maybe you could post your Apache proxy config, what you posted isn't really revealent
    – Froggiz
    Commented Nov 27, 2015 at 13:37
  • @Froggiz edited details.
    – ganesh abh
    Commented Nov 27, 2015 at 14:08

1 Answer 1

0

Have you tried with httpd's mod_proxy_ajp instead of mod_jk? Here's a short comparison of both connectors (and not only them).

What do you mean by the "direct IP"? An IP of the worker (bypassing the proxy)?

Other than that, you can try to sniff the AJP communication with tcpdump command line utility and then view it in ie. Wireshark. This would tell you ie. if there aren't any malformatted headers or any other problems that may hit your httpd-based reverse proxy, but are tolerated by your browser.

Also, pay attention to httpd's ProxyTimeout directive.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .