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

230
Views
Cómo servir la aplicación React con Apache Reverse Proxy en todos los dominios

Tengo una aplicación ficticia ejecutándose en http://160.119.253.70:3001 en React y Nginx dentro de Docker.

Tengo un dominio de prueba y URL (Apache) en: http://headlessway.capetown/reactllo

Me gustaría que las solicitudes a .capetown/reactllo reciban la aplicación React en la máquina 160.119.

Mi intento de Apache en .capetown:

 <VirtualHost *:80> RewriteEngine On # RewriteCond %{HTTPS} on # RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} ServerName headlessway.capetown ServerAlias headlessway.capetown ServerAdmin admin@headlessway.capetown DocumentRoot /var/www/html/headlessway/ ProxyPassMatch ^/reactllo(.*)$ http://160.119.253.70:3001/$1 ProxyPass /reactllo http://160.119.253.70:3001/ RewriteRule "^/home/.*$" "http://headlessway.capetown" RewriteRule "^/category/.*" "http://headlessway.capetown" RewriteRule "^/author/.*" "http://headlessway.capetown" </VirtualHost>

Y en el 160. VPS tengo este NGINX:

 server { listen 80; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }

Actualmente solo obtengo una página en blanco con el código HTML sin procesar, aunque funciona bien en http://160.119.253.70:3001 .

Me doy cuenta de que tengo muchas lagunas en mi comprensión: solo soy un aficionado y este es mi primer intento en los sitios JS.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Mis rutas eran relativas, por lo que no se solicitaron archivos clave. Pregunta tonta :) Cada día es un día escolar.

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!