Configurando um proxy reverso do Apache para o Node.js

3

Estou tentando configurar um proxy reverso do Apache para um aplicativo Node.js / Express.js que escuta na porta 8000. Esse servidor tem o cpanel instalado, mas tenho acesso ssh e praticamente ignoro o cpanel. Eu adicionei o seguinte ao topo do meu httpd.conf .

<VirtualHost 97.74.237.44:80>
    ServerName node.dealerdigitalgroup.com
    ServerAlias www.node.dealerdigitalgroup.com
    DocumentRoot /home/mydomain/public_html/node
    UseCanonicalName Off
    Options -Indexes
    ProxyRequests on
    ProxyPass / http://localhost:8000/
</VirtualHost>

Eu reiniciei httpd e iniciei meu aplicativo. Agora, quando eu tento acessar node.dealerdigitalgroup.com , eu recebo a página de índice, mas ela demora mais tempo do que deveria e o nó registra uma longa lista de erros.

> node app.js
Listening on port 8000
GET /403.shtml 404 6.307 ms - 9
GET /403.shtml 404 1.113 ms - 9
GET /500.shtml 404 0.566 ms - 9
GET /403.shtml 404 0.266 ms - 9
GET /403.shtml 404 0.262 ms - 9
GET /403.shtml 404 0.291 ms - 9
GET /403.shtml 404 0.341 ms - 9
GET /403.shtml 404 0.863 ms - 9
GET / 200 205.543 ms - 170
GET /403.shtml 404 0.418 ms - 9
GET /403.shtml 404 0.212 ms - 9
GET /stylesheets/style.css 200 67.533 ms - 110
GET /503.shtml 404 0.366 ms - 9
GET /403.shtml 404 0.508 ms - 9
GET /403.shtml 404 0.266 ms - 9
GET /400.shtml 404 0.375 ms - 9
GET /503.shtml 404 0.500 ms - 9
GET /403.shtml 404 0.181 ms - 9
GET /403.shtml 404 0.367 ms - 9
GET /403.shtml 404 9.250 ms - 9
.....

Ele continua assim até eu matar meu aplicativo de nó.

Quando visito node.dealerdigitalgroup.com:8000 , tudo funciona como deveria, então deve haver algum problema de configuração com o apache.

> apachectl -S
VirtualHost configuration:
127.0.0.1:80           is a NameVirtualHost
         default server s97-74-237-44.secureserver.net (/usr/local/apache/conf/httpd.conf:1191)
         port 80 namevhost s97-74-237-44.secureserver.net (/usr/local/apache/conf/httpd.conf:1191)
127.0.0.1:443          s97-74-237-44.secureserver.net (/usr/local/apache/conf/httpd.conf:1241)
97.74.237.44:443       is a NameVirtualHost
         default server shiftperformanceparts.com (/usr/local/apache/conf/httpd.conf:1139)
         port 443 namevhost shiftperformanceparts.com (/usr/local/apache/conf/httpd.conf:1139)
         port 443 namevhost s97-74-237-44.secureserver.net (/usr/local/apache/conf/httpd.conf:1241)
97.74.237.44:80        is a NameVirtualHost
         default server node.dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:27)
         port 80 namevhost node.dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:27)
         port 80 namevhost 97.74.237.44 (/usr/local/apache/conf/httpd.conf:276)
         port 80 namevhost dealerdigitalgroup.net (/usr/local/apache/conf/httpd.conf:298)
         port 80 namevhost dealerdigitalmarketing.com (/usr/local/apache/conf/httpd.conf:336)
         port 80 namevhost dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:374)
         port 80 namevhost lakeautobody.com (/usr/local/apache/conf/httpd.conf:412)
         port 80 namevhost riversidedodge.com (/usr/local/apache/conf/httpd.conf:450)
         port 80 namevhost shiftperformanceparts.com (/usr/local/apache/conf/httpd.conf:488)
         port 80 namevhost fakedomain.com (/usr/local/apache/conf/httpd.conf:526)
         port 80 namevhost theaddept.com (/usr/local/apache/conf/httpd.conf:565)
         port 80 namevhost homeloansdoctor.dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:603)
         port 80 namevhost tradeestimator.dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:641)
         port 80 namevhost pedderautogroup.tradeestimator.com (/usr/local/apache/conf/httpd.conf:679)
         port 80 namevhost temeculanissan.tradeestimator.com (/usr/local/apache/conf/httpd.conf:717)
         port 80 namevhost cardinero.dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:755)
         port 80 namevhost dashboard.dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:793)
         port 80 namevhost racewaynissan.tradeestimator.com (/usr/local/apache/conf/httpd.conf:831)
         port 80 namevhost testbuild.dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:869)
         port 80 namevhost peddernissan.tradeestimator.com (/usr/local/apache/conf/httpd.conf:907)
         port 80 namevhost forms.dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:945)
         port 80 namevhost hemetcdjr.tradeestimator.com (/usr/local/apache/conf/httpd.conf:983)
         port 80 namevhost lakecdjr.tradeestimator.com (/usr/local/apache/conf/httpd.conf:1021)
         port 80 namevhost node.dealerdigitalgroup.com (/usr/local/apache/conf/httpd.conf:1059)
         port 80 namevhost fitness19covina.dealerdigitalgroup.net (/usr/local/apache/conf/httpd.conf:1097)
         port 80 namevhost s97-74-237-44.secureserver.net (/usr/local/apache/conf/httpd.conf:1191)
wildcard NameVirtualHosts and _default_ servers:
*:*                    is a NameVirtualHost
         default server s97-74-237-44.secureserver.net (/usr/local/apache/conf/httpd.conf:288)
         port * namevhost s97-74-237-44.secureserver.net (/usr/local/apache/conf/httpd.conf:288)
Syntax OK
    
por RedHatter 30.06.2016 / 21:25

0 respostas