Hybrid system in one domain section IHybrid system in one domain section I

Question:

How do you deploy a hybrid system , saying that mixing WordPress CMS with Flask applications, in one domain ?

Yes. I am using Hybrid architect for the domain. You may ask why I should do with this complex ? My answer is quite simple, to make things done easily. See Flask app demo.

How is that ? Imaging that you are running CMS, like blogs, and eCommerce with WooCommerce. The best solution is to deploy these systems in WordPress. See ! it is just a piece of cakes if you know WordPress well.

But what if adding a Flask application to the architect? It is a common practice if you wanna run a customized application for your own. The limitation is you have only one domain.

Yes. You have only one domain to run multiple applications. Is it possible? Let me show my designed architect.

site architect

In the figure above, users could access your systems through a single web server, built on Apache. However, there are 3 applications behind the scenes. One is a blog , eCommerce is another, and Flask app goes next.

The blog and the eCommerce sites are built on WordPress, which is not difficult at all. For demo purpose, Flask app is simple one as well. In the long run, I will build a Stock analysis site to replace this simple Flask app.

All these applications will all connect to MySQL server. Flask app utilize WSGI to work with Apache web server.

Summarize the advantages of Hybrid system:

  1. You could install all of your applications in one domain to enrich your sites and save your money. Take this site for example, comhawk.com, based on WordPress, we could easily build one blog site and one eCommerce site. Meanwhile, we could also build Flask applications for complex systems, like data analysis and stock analysis.
  2. Apache supports the function of https (SSL). One setting for all applications, which saves a lot efforts.
  3. Apache is the only one which control the all the applications. Through it, you could start applications up or shut them down all together. Not necessary for you to configure Flask Applications as services one by one.

In the following post, I will give you briefing how to do this configuration.

Leave a Reply

Your email address will not be published.

Apache2

如何在 Ubuntu 上使用一個IP,多個網域的設定如何在 Ubuntu 上使用一個IP,多個網域的設定

Know-How 在 Apache2 上, 如何使用多個網域, Domains, 指向同一台機器或 IP 你想了解的是… 對網站開發或管理人員來說, 資料的管理與運用, 是你重要的績效.  不管是來自客戶, 或是來自於你的主管的要求. 希望你可以在同一台主機上, 安裝多個網站. 讓資源做最大的利用. 以下我會針對不同的場景, 來解釋如何配置不同的 Web Server.  測試的環境 OS : Ubuntu . 指令 lsb_release -a No LSB

如何將 Flask 系統安裝在 Apache 下如何將 Flask 系統安裝在 Apache 下

Flask application 是一套成長快速的 web framework。它的核心小,擴充性佳。對中小型的系統來說,是很方便的工具。 如果你對使用 Flask 開發有興趣,可以參考官方的教學文件。在未來,我也會逐一向大家介紹說明。 本篇文章主要是用來說明,如何將已開發完成的 Flask application 安裝在 Apache 下。觀看實際的 demo. (http 自動轉向到 https, 並啟動 Flask application ) . 這樣做的目的,或是好處: 你可以將你所有開發的系統,都掛在同一個網域(domain) 下。就如同本站,只有一個 comhawk.com 的網域. 使用 WordPress