Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

228
Visualizações
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 Respostas
Responde à pergunta

0

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

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda