-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default root url #2289
Comments
This is a duplicate of #257. Please see that issue for some community solutions 👍 |
I ran into this issue as well and none of the solutions in #257 seem to resolve this. I ended up modifying the server/index.js file and updating the routes in the method defineRoutes: I know this isn't the best solution right now but it's the only thing that works. Hopefully support for something like this is available in the future so I don't have to straight up modify core code. |
ok thanks for this, i will check that ! |
@qwang06 how did you modify predefined next server routes? |
I have an next/js app behind nginx with custom server node/express .
I launch it to port 3000. Nginx redirect the request myserver.com/mynextapp/ to port 3000 , but this is not working.
I can see the page server rendered, but the js doesn't working . In browser tool network i got 404 response for app.js and page/, because the request is myserver.com/_next/228ef92e59d376f055fc2c6d01c93b82/app.js instead of myserver.com/mynextapp/_next/228ef92e59d376f055fc2c6d01c93b82/app.js
It worked well when i simply opened the port 3000 in myserver.com but i try to avoid that.
Any idea ?
Thanks
The text was updated successfully, but these errors were encountered: