#Reverse proxy with Caddy

1 messages · Page 1 of 1 (latest)

burnt condor
#

I'm trying to deploy the back office application to a server. Here is what I already did :

  • builded the back office
  • ran the dist/server.js file with pm2 on port 3000
  • setup a reverse proxy with a CaddyFile :
admin.example.com {
    reverse_proxy 127.0.0.1:3000
}

However hitting admin.example.com returns a 302 to /admin (great news right ?). But the admin route gives me a 404 Cannot GET /admin . Do you have any idea of what is happening ?

burnt condor
#

Can't figure out what the problem. I don't even think it comes from Caddy.
Is this suppose to work curl http://localhost:3000/admin ? I'm having the same HTML error, Cannot GET /admin, and I don't find any logs 😦

wide cypress
#

Serving locally for you works?

burnt condor
#

Works on my computer with yarn dev will try the build version this evening

burnt condor
burnt condor
#

Ok, the server is working properly but only when I build with NODE_ENV=development. With NODE_ENV=production , I get the 404 error