next.js - 如何在 ubuntu-nginx-server 中部署 nextjs?
问题描述
example.com
我在使用dns托管的 ubuntu 服务器中的 nextjs-app 。我的 api 是从api.example.com
. 我的 env.production 文件具有 NEXT_PUBLIC_MY_VAR 的必要字段。安装了所有必要的 npm 依赖项。我尝试了许多命令,例如构建,开始。我没有克服它。请帮助我找到一种正确的方法,在带有 nginx-web-server 的 ubuntu os 服务器上部署 nextjs 应用程序。
- 应该运行哪些命令来构建 nextjs 应用程序?
- nfginx 服务器呈现的根文件应该是什么?
- 我的 nginx 服务器配置应该是什么
example.com
解决方案
推荐阅读
- ios - 在应用程序中返回bool值的目的是什么(_应用程序:UIApplication,打开url:URL,sourceApplication:String?,注释:Any)
- javascript - 返回异步数据,然后在 Node.js 中同步导出
- regex - 带有连字符的模式的正则表达式
- google-ads-api - 如何查看应用程序中是否设置了谷歌广告?
- azure-sql-database - 如何在 SSMS 中查看 Azure 表数据
- javascript - Vue 应用程序中的逻辑问题是由于相互依赖的变量而导致无限循环
- r - 从闪亮的服务器调用仪表板页面
- android - android oboe - 如何将andio歌曲设置为播放流
- go - 我可以得到一个字段是否已在golang中分配了反射
- r - 闪亮的renderDatatable给出一个扭曲的过滤器