0

404 page is working in my local but when i upload nextjs app to nginx i have a error

{"statusCode":404,"message":"Cannot GET /login/aaaa","error":"Not Found"}

login/aaaa must show 404

i have not-found.js

and this is my nextjs config:

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
trailingSlash: true,
reactStrictMode: true,
swcMinify: true,
images: {
unoptimized: true,
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
}
}

module.exports = nextConfig

0 Answers0