带有 WordPress 博客的 Heroku 应用程序
我最近发现 Heroku 现在允许 PHP,这意味着可以在其上托管 WordPress 博客。我还找到了这个项目模板: https://github.com/mhoofman/wordpress-heroku
我有一个 Ruby on Rails 应用程序,该应用程序将托管在 Heroku 上,域名为 www.mysite.com,在该应用程序中,我需要一种让 www.mysite.com/blog 显示 WordPress 博客的方法。
有人可以帮助我,详细说明如何做到这一点吗?
I recently discovered that Heroku now allows PHP which means that a wordpress blog can be hosted on it. I also found this project template: https://github.com/mhoofman/wordpress-heroku
I have a ruby on rails app which is to be hosted on heroku with a domain www.mysite.com, and in that app, i need a way for www.mysite.com/blog to show the wordpress blog.
Can someone help me out, with details on how I can do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
虽然我没有使用过新的 PHP 平台,但我认为您所要求的东西是不可能的。
当您将应用程序部署到 Heroku 时,它会在推送过程中检测应用程序的类型并相应地设置应用程序,Heroku 使用 Apache 托管 PHP,正如您从这篇文章的输出中看到的那样 http://tjstein.com/2011/09/running-wordpress-on-heroku-and-amazon-rds/ - 尚未在单个应用程序中提及混合平台所以可以想象它不受支持。
最接近的方法是将您的网站和博客托管在两个单独的应用程序中,博客位于 blog.mysite.com 上,然后将 www.mysite.com/blog 重定向到 blog.mysite.com 网址。
Whilst I've not used the new PHP platform I don't think what you're asking for is going to be possible.
When you deploy an application to Heroku it detects the type of application during the push process and sets up the application accordingly, Heroku use Apache to host PHP as you can see from the output in this post http://tjstein.com/2011/09/running-wordpress-on-heroku-and-amazon-rds/ - there's not been any mention of mixing platforms in a single application yet so would imagine that it's not supported.
The nearest you'd get is hosting your site and your blog in two seperate applications with the blog on blog.mysite.com and then put a redirect on www.mysite.com/blog to the blog.mysite.com url.
我仍在努力解决这个问题,
最接近获得解决方案的是使用反向代理 gem,
请参阅此处的答案:
如何使用子目录而不是子域?
Im Still working on this
the closest to getting a solution is using the reverse proxy gem
see the answer here:
How can I use a subdirectory instead of a subdomain?