Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

392
Views
Node.JS + Apache - No se puede OBTENER

Estoy tratando de usar Apache y Node.JS al mismo tiempo, pero no funciona como se esperaba.

 // Apache ProxyPreserveHost On ProxyRequests Off ServerName mydomain.com ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/

Y para mi server.js

 // Node const express = require ('express'); const server = express(); server.get('/', function(req,res){ return res.send('The code works fine here'); }); server.get('/foo', function(req,res){ return res.send('Here => Cannot GET /foo'); }); server.get('/foo2', function(req,res){ return res.send('Here too => Cannot GET /foo2'); }); server.listen(3000, function() { console.log('server is only working for "/" ') });

mydomain.com funciona perfectamente, pero no puedo encontrar la manera de hacer que todos los demás subdominios mydomain.com/* funcionen. ¿Alguien puede darme una luz?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puedes usar el proxy inverso de Apache

Agregue esta configuración a su apache conf.

ProxyPass "/nodeapp" "http:/localhost:8443"

Puede acceder a la aplicación de nodo por http://www.example.com/nodeapp

Un proxy inverso es un tipo de servidor proxy que recupera recursos en nombre de un cliente del servidor. Estos recursos luego se devuelven al cliente como si se originaran en el propio servidor web.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!