Skip to content
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

404: page not found error when Deployment on Nginx's reverse proxy #2051

Closed
manishbalyan opened this issue May 23, 2017 · 2 comments
Closed

Comments

@manishbalyan
Copy link

hey, i am deploying my nextjs app on nginx where django is running on nginx. i want my nextjs app to run on mydomain/something but its not working giving 404 page not found error whereas when i run it on mydomain/ it work fine.
please suggest something how i can run it. i followed your wiki link but its not working.do i need to change my server.js file which is like this.

`const next = require('next')
const routes = require('./routes')
const app = next()
const handler = routes.getRequestHandler(app)

// Without express.js
const {createServer} = require('http')
app.prepare().then(() => {
createServer(handler).listen(4000, err => {
if (err) throw err
console.log('> Ready on http://192.168.90.12:4000')
})
})`

@hchoriq
Copy link

hchoriq commented May 23, 2017

What's your nginx directive for /something?

@timneutkens
Copy link
Member

Somewhat a duplicate of #257, it's not possible at the moment.

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants