从apache代理的nodejs:代理服务器从上游服务器收到无效响应

时间:2017-09-07 12:29:32

标签: node.js apache proxypass

我有nodejs服务器和一些静态内容要服务。我正在使用apache 2.4用于此目的,因为我需要在同一台机器上配置多个主机。

我在apache 2.4中对我的虚拟主机进行了以下配置

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin admin@mydomain.co.in
    ServerName mydomain.co.in
    ServerAlias mydomain.co.in
    ProxyPass /api http://127.0.0.1:3001/api
    ProxyPassReverse /api http://127.0.0.1:3001/api
    DocumentRoot /root/VEFA-test-admin/vefa-admin/platforms/browser/www
    <Directory /root/VEFA-test-admin/vefa-admin/platforms/browser/www>
                Options -Indexes +FollowSymLinks +MultiViews
                AllowOverride All
                Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/encrypt/live/mydomain.co.in/fullchain.pem
SSLCertificateKeyFile /etc/encrypt/live/mydomain.co.in/privkey.pem
</VirtualHost>
</IfModule>

我的nodejs服务器在同一台机器上的端口3001上运行。问题是用户将使用mydomain.co.in访问我的网站来查看该页面。但在一种情况下,我将用户重定向到支付网关,支付网关在付款后重定向用户bak在我的网站上。当支付网关将用户重定向到我的网站时,会出现此问题。

apache错误日志说明了这一点:

[Thu Sep 07 12:08:06.291298 2017] [proxy_http:error] [pid 12226:tid 139763780601600] (20014)Internal error (specific information not available): [client 219.91.211.175:11159] AH01102: error reading status line from remote server 127.0.0.1:3001, referer: https://test.payumoney.com/payment/postBackParam.do
[Thu Sep 07 12:08:06.291358 2017] [proxy:error] [pid 12226:tid 139763780601600] [client 219.91.211.175:11159] AH00898: Error reading from remote server returned by /api/u/payments/success, referer: https://test.payumoney.com/payment/postBackParam.do

我在这里做错了什么?

我已尝试过我在下面提到的所有解决方案

我曾尝试使用Keepalive,ProxyBadHeader忽略但没有任何帮助我。有人可以帮助我吗?

0 个答案:

没有答案