Next.js Discord

Discord Forum

middleware issue on shared hosting custom server (deployment)

Unanswered
Common Murre posted this in #help-forum
Open in Discord
Common MurreOP
I have implemented the server maintaining all the required things following the https://nextjs.org/docs/app/building-your-application/configuring/custom-server and other resource available. My application is working fine in the localhost but getting problems when I deploy it on the shared hosting. all the routes mentioned in the config.matcher are showing not-found page instead of its page. I have tried using the hostname for the production for example: example.com, 120.320.245.43 (shared IP address), but it is not working. i have added the code in this repo https://github.com/robiulhr/next-middleware-custom-server-issue/

project is now live on https://test.kc-garments.com/ (visit the private page - will get not found page instead of the actual page)

0 Replies