【问题标题】:How to run a Ghost blog alongside ReactJS app?如何在 ReactJS 应用程序旁边运行 Ghost 博客?
【发布时间】:2016-10-06 18:55:04
【问题描述】:

我有一个基于 Node + ReactJS 的应用程序/网站。我想通过自定义安装的 Ghost.org 为其添加一个博客。经过几个小时的谷歌搜索,我仍然不知道该怎么做,所以我真的在寻找起点,例如:

-我如何“结合”这两者,以便在 myapp.com/blog 上拥有博客(而不是在子域上)? -如何从我的 React 应用程序路由到博客? - 如果我的应用程序运行在与 ghost 要求不同的节点版本上,甚至有可能吗?

任何指针将不胜感激

【问题讨论】:

  • 您使用的是什么网络服务器?阿帕奇? nginx?

标签: reactjs ghost


【解决方案1】:

我没有证明这一点,但我很确定它可以工作。

如果你使用的是 nginx,你应该关注this answer 并像这样配置 nginx:

location /blog/ {
        rewrite   ^/blog(/.*)$ $1 break;
        proxy_pass http://localhost:9000; # You should configure ghost to run on port 9000
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多