Recently I learn something about nextjs because I want to make a site which SEO friendly by using React. Everything looks great until I ran into a problem.
It's about how can I deploy nextjs app into a directory which is not a root directory, for example '/next'. I use a simple config for nextjs, use the default node server listen to 3000 port and then use nginx for reverse.
next.config looks like :
nginx conf :
When I access localhost:8080/next I got the 404 page which is provided by nextjs and the css or js is also 404. It seems like the config of nextjs or nginx is wrong.

