How to display independent content and configuration for each site in a Docker-deployed AnQiCMS multi-site environment?

Calendar 👁️ 72

In today's internet operations, many businesses or individuals often need to manage multiple websites to serve different brands, products, or target audiences.AnQiCMS (AnQiCMS) with its powerful multi-site management capabilities, can easily meet this requirement on a single core system.When deploying with Docker, a popular containerization technology, how to ensure that each site can run efficiently and independently display its content and configuration becomes a topic worth discussing.

The AnQi CMS implements independent display of multiple sites in the Docker environment, the core lies in understanding the system architecture design and the Docker network proxy mechanism.It allows you to run multiple logical sites with different domains pointing to an AnQiCMS instance (usually running in a Docker container), and these sites are completely independent in terms of content, templates, and settings.

Understand the independent mechanism of multiple sites in AnQi CMS

The reason why AnQi CMS can support independent display of multiple sites is due to its exquisite design concept.It is not simply a copy of multiple programs, but uses a unified core program to manage data for multiple independent sites.This means that, although all your websites may share the same AnqiCMS Docker container instance, each site:

  1. Content data: Articles, products, categories, tags, single pages, etc., are stored in separate independent database tables or distinguished by database naming.
  2. Configuration informationWebsite name, Logo, filing number, copyright information, contact information, TDK (Title, Description, Keywords) settings, even the background administrator account and password, are all exclusive to the site.
  3. Template StyleEach site can choose or customize different templates to achieve a completely unique visual style.

This architecture greatly simplifies the deployment and maintenance of multi-sites, improves resource utilization, and also ensures the independence and data security between sites.

Basic Deployment in Docker Environment

To deploy AnqiCMS in Docker and support multiple sites, you first need a Docker container running AnqiCMS and use a reverse proxy to import external traffic.

  1. Deploy AnqiCMS Docker container: You would usually use something similaranqicms/anqicms:latestSuch a Docker image to create a container and map the internal listening port (default 8001) to a port on the host machine.For example, mapping to the host's 8001 port.

  2. Configure reverse proxy (Nginx/Apache)This is a critical step in achieving independent display of multiple sites. The reverse proxy server (such as Nginx or Apache) acts as a gatekeeper for external requests. When you havesite1.comandsite2.comWhen you have two domain names, you need to configure reverse proxy:

    • tosite1.comThe request should be forwarded to the host port listened by the AnqiCMS Docker container (for example)127.0.0.1:8001)
    • tosite2.comThe request should also be forwarded tothe samePort that the AnqiCMS Docker container listens on (127.0.0.1:8001)

    In this way, all requests from different domain names will eventually reach the same AnqiCMS container instance. AnqiCMS will use the information in the request headers ofHostThe field (i.e., the domain visited) is used to identify which site's request it is, and to load the corresponding site data and configuration.

Configure independent sites and content in the AnQi CMS backend.

Once the Docker container and reverse proxy are ready, all the independence configurations will be completed in the AnqiCMS backend.

  1. Access the main site backend: Access the AnqiCMS main station backend through the first configured domain (for examplehttp://site1.com/system/)

  2. Add a new siteIn the left menu of the AnqiCMS backend, find the "Multi-site Management" function, click "Add New Site". Here, you need to configure the new site in detail, which is a core step to ensure its independence:

    • Site name: Name the new site for easy identification and management in the background.
    • Site root directory:This is one of the keys to achieve data independence.AnqiCMS will use this directory to store the independent files of the site, such as cache, uploaded resources, etc. In the Docker environment, this path will usually be/app/starts with a unique directory name, for example, replacing the dots in the domain with underscores likedev_anqicms_comthe final path might be/app/dev_anqicms_commake sure that the root directory of each site isUnique and not repeated.
    • website address: Enter the full domain name of the new site (for examplehttp://site2.com) This is the basis for AnqiCMS to identify different sites.
    • Administrator account passwordSet an independent backend login account and password for the new site.
    • Database name:This is the core of achieving content independence.Each AnqiCMS site requires an independent database to store articles, products, categories, and other data. You can create a new database name, for example, in the same domain transformation form, such asdev_anqicms_comEnsure that the database name for each site is alsoUnique and not repeated.
    • Duplicate database informationIf all AnqiCMS sites in your Docker deployment use the same database server (for example, a MySQL container in Docker), you can choose to 'reuse the default database account information' and do not need to re-enter the database connection credentials.
    • Select the template to use: Choose a dedicated template for the new site. AnqiCMS will store the template files in/templateUnder each directory, each site can specify its own template directory, thus achieving a completely independent page style.

After completing the above configuration, click OK to create and activate a new, independent AnqiCMS site. At this point, bysite2.comvisiting, you will see a new, unique andsite1.comThe website content and configuration are completely independent sites.

The key to isolating the template from the content

By the above steps, each site has achieved high isolation at the logical and data levels:

  • Content independent: As each site is bound to a unique database name, all of its articles, categories, single pages, tags, and other content are stored in their respective databases, without interference. When you aresite1.comWhen published on the backend, it will only display insite1.comwhilesite2.comwill display its independent article.
  • Configure independentlyIn the AnqiCMS backend "Backend Settings" section, for example, "Global Function Settings", "Contact Information Settings", "Home Page TDK Settings", etc., any modifications made to a specific site will only affect that site and not others.
  • Template independent: The template chosen when each site is created will determine its frontend display style. You can design a completely different template for each site or

Related articles

How to display a friendly prompt page to users during website maintenance or upgrade?

During the operation of the website, whether it is system upgrades, data migration, or routine maintenance, it is inevitable that there will be situations where the website needs to be temporarily closed or some functions cannot be accessed.How to convey clear and friendly information to users visiting the website at this time, to avoid confusion or direct loss of users, is the key to improving user experience and maintaining brand image.lucky enough, AnQiCMS provides a simple and efficient mechanism to help us easily deal with such situations. ### Why is it necessary to have a friendly maintenance page for website upgrades?

2025-11-07

How to organize reusable display modules in a template through `include`, `extends`, and other tags?

Aq enterprise CMS template: Use `include` and `extends` to create efficient and reusable display modules When using Aq enterprise CMS to build a website, you will quickly find that it is very flexible in organizing content display.Especially when dealing with templates, the built-in Django template engine syntax allows us to build pages efficiently like building with blocks.Today, let's talk about how to cleverly use the powerful tags `include` and `extends` to organize and manage reusable display modules on your website, making your templates cleaner and easier to maintain

2025-11-07

How to configure 301 redirect rules to avoid SEO impact after content adjustment?

Website content operation is a continuous job, with the development of the business, content updates, adjustments, and even optimization of the website structure can lead to changes in page URLs.However, if these URL changes are not handled properly, they often have a significant negative impact on the website's search engine optimization (SEO), such as a drop in rankings, loss of traffic, and so on.This is when the 301 redirect becomes a key tool for us to avoid these negative impacts and maintain the SEO health of the website.### Understanding the value of 301 redirect In simple terms, 301 redirect (Moved

2025-11-07

How to categorize image resources and display them on the front end according to categories?

Images are an indispensable part of a website's content, as they can not only beautify the page but also effectively convey information and enhance the user experience.However, with the increase in the number of images on a website, how to efficiently manage these image resources and flexibly display them on the front page as needed has become a challenge for many website operators.AnQiCMS (AnQiCMS) is well-versed in this field, providing a user-friendly and powerful image resource management system that helps us easily manage these visual elements.

2025-11-07

How to efficiently manage and display independent content and data for multiple sites in AnQiCMS?

Managing the content and data of multiple websites is often a time-consuming and error-prone challenge for many businesses and content operators.Different brands, product lines, or independent sites for different regions or language audiences often mean that separate content management systems need to be independently built and maintained, leading to分散 of resources, increased workload, and even making it difficult to achieve effective collaboration management.

2025-11-07

How to customize the content model to flexibly display articles, products, events, and other types of information?

In today's increasingly diverse era of content marketing, the types of information that websites need to carry are also becoming more varied.Relying solely on the general types of "articles" and "products" often fails to meet the personalized display needs of corporate or self-media operators, such as posting event notifications, job postings, case studies, or industry reports.At this time, the customized content model feature provided by AnQiCMS (AnQiCMS) has become a powerful tool for us to flexibly manage and display these diverse pieces of information.Content model, in a word, is a structural blueprint for content.

2025-11-07

How does AnQiCMS's multilingual support feature help website content to be targeted at global users?

In the digital age, website content is no longer just for local users, but carries the mission of connecting with a global audience.For businesses and content operators that want to expand into the international market and serve users with diverse cultures, embracing multilingual capabilities has become the key to success.AnQiCMS, as an efficient content management system, is well-versed in this and provides a solid foundation for your website content to go global through its powerful multilingual support feature.AnQiCMS was designed with globalization needs in mind, one of its core features is to provide native support for switching and displaying multilingual content

2025-11-07

How to configure pseudo-static and 301 redirection to optimize website URL structure and SEO effects?

The structure of a website's URL is like the address of a building, a clear and logical address not only allows visitors to easily find their destination, but also helps "mailmen" (search engine spiders) to efficiently deliver "parcels" (website content).A well-designed URL structure is the foundation for improving search engine optimization (SEO) effectiveness.AnQiCMS knows this and therefore integrated powerful pseudo-static and 301 redirect management features into its design, aimed at helping users easily build SEO-friendly websites.Understanding the importance of pseudo-static URLs In the world of websites

2025-11-07