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.
My paths were relative, so key files not requested. Silly question :) Every day is a school day.