Rup*_*mah 5 wordpress ubuntu nginx amazon-ec2 next.js
我开发了一个 Nextjs 项目(例如www.example.com),该项目托管在带有 Nginx 服务器的 EC2 Ubuntu20 上。现在我希望 BLOG 部分在 wordpress 的子目录中实现(例如www.example.com/blog)。我需要 Ubuntu 和 Nginx 配置部分的帮助。另外,需要知道我应该在哪个文件夹中安装 wordpress 包。
是的,您可以通过使用重写来做到这一点next.config.js
module.exports = {
rewrites() {
return [
{
source: "/",
destination: "http://mywordpresssite.com/",
},
];
},
};
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
545 次 |
| 最近记录: |