Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

229
Vistas
How To Serve React App With Apache Reverse Proxy Across Domains

I have a dummy app running at http://160.119.253.70:3001 on React and Nginx within Docker.

I have a test domain and URL (Apache) at: http://headlessway.capetown/reactllo

I'd like requests to the .capetown/reactllo to be served the React App on the 160.119 machine.

My Apache attempt on the .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>

And on the 160. VPS I have this 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;
  }
}

I currently just get a blank page with the raw HTML served, whilst it runs fine on http://160.119.253.70:3001.

I realise I have many gaps in my understanding - I'm a just a hobbyist and this is my first attempt at JS sites.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

My paths were relative, so key files not requested. Silly question :) Every day is a school day.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda