I'm just trying to run a nodejs app I made on a proxypass domain, and have it work exactly as it did on my desktop. However, for some reason, even though I defined a seperate document root for this proxypass path, it didn't load the files from it. I've done the exact same thing with my 404 page, and it worked. Here's the page in question: https://jakesandbox.com/iwl which does load the server.js file, which in turn loads the index.html file, but all of the scripts and styles the index references cannot be loaded. Here's my nginx config(with censors):
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
root /home/ubuntu/FAKE WEB ROOT DIR;
index index.html index.htm index.php index.nginx-debian.html;
server_name XXxXX.com;
error_page 404 /404.html;
location = /404.html {
root /home/ubuntu/FAKE ERROR DIR/;
internal;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
ssl_certificate /etc/letsencrypt/live/XXxXX.com.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/XXxXX.com.com/privkey.pem;
location /iwl {
root /home/ubuntu/FAKE NODEJS DIR/;
proxy_pass http://localhost:PORT/;
proxy_ssl_trusted_certificate /etc/letsencrypt/live/XXxXX.com.com/fullchain.pem;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
}
}
P.S. I'm not willing to relocate my nodejs app to my webroot/change paths