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

227
Views
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 answers
Answer question

0

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

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!