1

I have a question similar to: Apache ProxyPass ignore static files, but I'm not able to solve mine, so looking for some help.

I have this .conf file:

<VirtualHost *:80>

ServerName hci.local
ServerAdmin paul.allsopp@office-server.local
DocumentRoot /var/www

ErrorLog /var/log/httpd/hci/error.log
CustomLog /var/log/httpd/hci/access.log combined
LogLevel error

RewriteEngine On

<Directory /path/to/foo>
    AllowOverride  None
    Require all granted
</Directory>

ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On

<Proxy *>
    AddDefaultCharset off
    Order deny,allow
    Allow from all
</Proxy>

ProxyPass / http://localhost:3000
ProxyPassReverse / http://localhost:3000

My app folder looks like:

/public
  /js
  /css
  /img
/src
.
.
app.js

I'm using PM2 to server the NodeJs app, which loads just fine, but I'm missing some proxy config line or 2 as I cannot load static files from the public folder.

Any help greatly appreciated. Paul

Paul Allsopp
  • 131
  • 6

1 Answers1

1

My issue was really simple and something I had read, but then not realized I was doing it myself:

The ProxyPass and ProxyPassReverse URLs need a trailing slash! As soon as I added those, everything worked just fine.

silly developer

Paul Allsopp
  • 131
  • 6