Efficiently deploy multiple AnQiCMS instances on the same server
In the practice of website operation, we often encounter such needs: we may need to build independent websites for different brands, different product lines, or even different customers, while hoping that these websites can run efficiently and stably on the same physical server.AnQiCMS as a CMS specially designed for multi-site management provides very flexible and powerful deployment options.This is not just simple copy and paste, but also involves multiple dimensions such as resource optimization, management efficiency, and system stability.
We will discuss the two main strategies for deploying multiple AnQiCMS instances on the same server, and analyze their applicable scenarios and specific implementation ideas.
Strategy one: Utilize the built-in multi-site management feature of AnQiCMS
One of AnQiCMS's core advantages is its “Multi-site Management” feature.This means that you do not need to deploy multiple independent AnQiCMS applications on the server, but instead, you can create and manage multiple completely independent websites within a single AnQiCMS system.This approach is tailored for businesses with multiple brands, sub-sites, or content branches.
Implementation idea:
Firstly, you need to deploy an AnQiCMS master instance on the server.This main instance will serve as the unified management entrance for all sub-sites.The deployment process can refer to the official installation tutorial of AnQiCMS, whether it is in the Baota panel, 1Panel's Docker environment, or installed through the command line, the ultimate goal is to ensure that an AnQiCMS application runs normally and listens to a specific port (default is 8001).
- Deploy the main instance of AnQiCMS:Follow the official guidelines to complete the installation and initialization of the first AnQiCMS. For example, deploy it on the server's port 8001.
- Configure reverse proxy:For each website domain you plan to deploy (for example
site1.com/site2.comConfigure an independent virtual host (Virtual Host) in Nginx or Apache. These virtual hosts will all reverse proxy traffic to the port that the AnQiCMS main instance is listening on (for examplehttp://127.0.0.1:8001)。The benefits of doing this are that, for external visitors, they access an independent domain, and internally, all requests are processed by that AnQiCMS instance running on port 8001. - Add a new site in AnQiCMS backend:Log in to the backend management interface of your AnQiCMS main instance, find the "Multi-site Management
- Site Name:用于后台管理区分。
- Site Root Directory:AnQiCMS will create a separate directory for each sub-site to store its cache, uploaded files, and other data. For example,
/app/site1_com. - Website address:The actual access domain of the child site.
- Independent database:Although sharing the AnQiCMS application, it is best for each sub-site to have an independent database to achieve data isolation and management. When adding a new site, you can choose to reuse the default database account information, but the database name needs to be independently set for the new site (for example,
site1_db). - Select template: Select an appropriate template for the new site.
This way, all websites run on the same AnQiCMS application.This means that their program code, dependencies, and core configuration are shared.This strategy greatly simplifies system maintenance (only upgrading one AnQiCMS application) and optimizes the use of server resources.It is particularly suitable for scenarios that require managing multiple closely related, similar-function websites, such as product series websites, brand websites in different regions, etc.
Strategy two: Deploy an independent AnQiCMS instance
In some cases, you may need a truly 'independent' instance.This is usually for the purpose of stricter isolation, personalized customization, or the need to run different versions or configurations of AnQiCMS.For example, you may need to test the functionality of a new AnQiCMS version, or provide a completely independent, unaffected by other websites CMS environment for a specific customer.
Implementation idea:
Deploy an independent