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

304
Views
Aplicación Node.js y back-end Apache php en el mismo servidor

Tengo un VPS que se ejecuta bajo CentOS 7. La idea es: tener la aplicación de front-end node.js en maindomain.com implementada mientras que en api.maindomain.com se implementó el back-end de php. ¿Es posible? Digamos, agregue bloques de servidor a Nginx: proxy inverso localhost: 4000 para la aplicación node.js y el otro bloque para localhost: 80 para php back-end.

Tal vez exista la otra solución, no lo sé, ¡agradecería cualquier idea! El objetivo principal: tener ambas aplicaciones en el mismo servidor.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Solución 1 con www.maindomain.com + api.maindomain.com

Interfaz

 server { listen 80; server_name www.maindomain.com; location / { root /path/to/your/files; try_files /index.html; } }

API php back-end

 server { listen 80; server_name api.maindomain.com; location / { proxy_pass http://localhost:4000; } }

Solución 2 todo en el mismo dominio, www.maindomain.com

 server { listen 80; server_name www.maindomain.com; location /api { proxy_pass http://localhost:4000/api; } location / { # always at the end, like wildcard root /path/to/your/files; try_files /index.html; } }
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!