简体   繁体   English

如何使用AngularJS将wordpress博客集成到AWS托管的自定义单页应用程序网站上

[英]How to integrate wordpress blog into a custom Single page app website hosted on AWS using AngularJS

I have a custom website that is hosted on AWS managed using Elastic BeanStalk. 我有一个自定义网站,该网站托管在使用Elastic BeanStalk管理的AWS上。 The web app is built using ANgularJS framework. 该网络应用是使用ANgularJS框架构建的。 I have a separate blog hosted on wordpress. 我在wordpress上托管了一个单独的博客。 I would like to migrate and integrate this blog into existing website. 我想将该博客迁移并集成到现有网站中。 Has anyone had experience with this? 有人对此有经验吗? If so can i get some pointers on how to proceeed here. 如果是这样,我可以在这里获得一些如何进行的指示。

Example. 例。 my custom website is mywebsite.com Current wordpress blog is myblog.com I want to create mywebsite.com/blog and have all my wordpress blog content integrated into mywebsite.com/blog 我的自定义网站是mywebsite.com当前的wordpress博客是myblog.com我想创建mywebsite.com/blog,并将我所有的wordpress博客内容集成到mywebsite.com/blog中

You can use AWS CloudFront for this. 您可以为此使用AWS CloudFront。 Include the Blog and the Angular App as two origins and add behaviors accordingly to route. 将Blog和Angular App包括为两个来源,并相应地添加行为以进行路由。 Map your domain name to AWS CloudFront. 将您的域名映射到AWS CloudFront。

eg Create a behavior for /blogpost to point to Wordpress origin. 例如,为/ blogpost创建一个行为以指向Wordpress的起源。 mywebsite.com/blogpost -> WordpressDNS/blogpost mywebsite.com/blogpost-> WordpressDNS / blogpost

If you have URL rewrite requirement, use Edge Lambda to code the URL rewrite logic. 如果您有URL重写要求,请使用Edge Lambda编写URL重写逻辑。

For more details in setting up Wordpress behind CloudFront refer this blog post. 有关在CloudFront背后设置Wordpress的更多详细信息,请参阅博客文章。 In addition you will need to install a Wordpress Plugin to avoid Mixed Content issues (If you setup SSL for your website). 此外,您将需要安装Wordpress插件来避免混合内容问题(如果您为网站设置了SSL)。

You have some options I can think of: 您可以想到一些选择:

A: You could simply do a wordpress installation in the blog directory, of course needing php/mysql running on your environment. 答:您只需在blog目录中进行wordpress安装,当然需要在您的环境中运行php / mysql。

B: You could install wordpress and use it as a back end and use Angular as your front end so that it easily integrates with your current app. B:您可以安装wordpress并将其用作后端,而将Angular用作前端,以便轻松地与当前应用程序集成。 The front end would consume data from the WP API. 前端将消耗WP API中的数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 借助内部托管的基于AngularJS的单页应用程序,如何连接到AWS云服务器 - With AngularJS based single page apps hosted on premise, how to connect to AWS cloud servers 使用AngularJS和Middleman制作类似博客的单页应用程序 - Making a blog-like single page application using AngularJS and Middleman 如何在不使用AngularJS加载新页面的情况下让我的wordpress网站在同一页面上显示博客文章? - How can I get my wordpress site to show a blog post in the same page without loading a new page using AngularJS? 我们可以将WordPress博客集成到Angular JS网站吗? - Can we integrate a WordPress blog in to an Angular JS website? 如何将AngularJS视图与Wordpress集成? - How to integrate AngularJS view with Wordpress? 如何操纵 <title> AngularJS单页面应用程序? - How to manipulate the <title> of an AngularJS single page app? 在AngularJS应用程序中正确包含Wordpress博客的策略 - Strategy to properly include Wordpress blog within an AngularJS app 如何使用angularjs将Paypal标准集成到我的应用程序中? - How can i integrate paypal standard in my app using angularjs? 使用MySQL和托管服务器的AngularJS / Ionic应用程序? - AngularJS/Ionic app using MySQL with hosted server? 在单页面Web应用程序中使用AngularJS路由 - Using AngularJS routing with a single-page web app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM