How to configure multi-site content display in AnQiCMS

Calendar 78

Easily implement multi-site content management and display in AnQiCMS

For users managing multiple brands, sub-sites, or content branches, it is a challenge to unify the management of content across all sites.AnQiCMS provides powerful multi-site management functionality, allowing you to easily create and maintain multiple independent websites under a single system instance and flexibly control the display of their content.This article will introduce in detail how to configure multiple sites in AnQiCMS and implement independent management and display of content.

1. Prepare: Ensure the AnQiCMS environment is ready

Before starting to configure multiple sites, make sure that an AnQiCMS instance is installed and running on your server.The most recommended way is to use Docker deployment, which can provide a simple and efficient running environment.Generally, an AnQiCMS instance listens to a specific port, such as the default one8001.

In addition, you need to prepare a separate domain name for each new site created under each plan, and these domains should be correctly resolved to your server IP address.This is the basis for the normal operation of the multi-site function.

2. Configure reverse proxy: Point the direction for the new site

The multi-site feature of AnQiCMS is implemented through a single backend to manage multiple frontend websites, which means that all website requests ultimately lead to the same AnQiCMS program.In order for different domain names to access the corresponding site content correctly, we need to configure reverse proxy for each new domain.Here is an example using the Baota panel to demonstrate how to set up reverse proxy, the principle is similar for other environments (such as manually configuring Nginx or Apache):

  1. Create a site on the Baota panel (only for proxy)Log in to your Baota panel, go to the "Website" menu.To generate an SSL certificate for your new domain and manage the website directory, you need to click 'Add Site'.In the pop-up window, enter the new site domain (for exampledev.anqicms.comSet the root directory to a new path not occupied by other websites (for example)/www/wwwroot/dev.anqicms.com). FTP and database can be chosen not to be created, select the "pure static" PHP version, and then submit.Remember this newly created site directory, it will be used in the AnQiCMS backend later.

  2. Configure reverse proxy rulesAfter the new site is created, click the "Settings" button on the right side of the site. In the settings interface, find the "Reverse Proxy" tab and click "Add Reverse Proxy".

    • Proxy Name: Fill in at will, for example, "AnQiCMS proxy".
    • Target URL: Fill in the address and port that your AnQiCMS instance is listening on, which is usuallyhttps://en.anqicms.com. If you have modified the AnQiCMS running port, please fill in the corresponding port number.
    • Send domain: Select "$host".
    • Check "Enable reverse proxy" and then click "Submit".

With such configuration, when the user accessesdev.anqicms.comAt that time, the Baota panel will forward the request to the AnQiCMS program running locally on port 8001.

3. Add a new site in the AnQiCMS backend: define site characteristics

After completing the reverse proxy configuration, we need to register this new site in the AnQiCMS management backend next.

  1. Log in to the default site's management backend: Visit the backend address of your AnQiCMS default site (for examplehttp://your-main-domain.com/system/), log in with the admin account.

  2. Enter multi-site management: Find and click the "Multi-site Management" feature in the left menu.

  3. Add a new siteClick the "Add new site" button and you will see a form that requires you to fill in the details of the new site:

    • Site nameChoose a name for your new site that is easy to recognize.
    • Site root directoryHere is very critical! As AnQiCMS runs in Docker and needs to provide independent storage space for each site's data (such as cache, uploaded files, etc.), this directory path must end with/app/starts and isUnique. It is recommended to replace the dot in the domain name with an underscore, for example,/app/dev_anqicms_com. Make sure this path matches the directory path of the site you created in the Baota panel, but change the prefix to/app/.
    • website address: Enter the complete domain name you have prepared for the new site, for examplehttp://dev.anqicms.com.
    • Administrator account/password: Set an independent administrator login credential for the new site's backend.
    • Database name: Similarly, set an independent database name for the new site, for example.dev_anqicms_com. This ensures that each site has independent data storage.
    • Duplicate database informationIf you are installed with Docker and the database is in the same network as the AnQiCMS container, you can usually choose to 'reuse the default database account information', because the Docker container can access the same database service.If your database is deployed independently, you need to fill in the connection information manually.
    • Select the template to use: Choose a default template theme for the new site.

After filling in, click "OK" to complete the creation of a new site. At this point, a new independent site has already been successfully added to your AnQiCMS system.

4. Independent management and configuration of multi-site content

Once the new site is created successfully, it will have an independent management backend. You can directly enter by clicking the "Access Backend" button in the "Multi-site Management" list, or you can directly enter it in the browser.http://dev.anqicms.com/system/Access.

In this independent dashboard, you can manage this new site just like you would manage a single website:

  • Global SettingsConfigure the site name, logo, filing number, copyright information, etc.
  • Content Management: Independently publish articles and products, create categories and tags, and define a unique content model.
  • Page Resources: Manage exclusive single pages and media files.
  • function managementConfigure SEO (pseudo-static, TDK), friend links, message forms, etc. for the site.
  • template designEnable or customize templates for the site.

This means that each site can have its own brand image, content strategy, and SEO optimization without switching between different systems.

5. Flexible display and calling of multi-site content

The template tag system of AnQiCMS is very flexible, supportingsiteIdparameter control of content display range.

  • Default behaviorWhen you do not specify the parameters in a template on a sitesiteIdall content will be used

Related articles

In document management, how is the recommended attribute `flag` used to control the display of content on the homepage or other special locations?

In Anqi CMS, the "recommended attribute" (`flag`) is a powerful and flexible feature that allows you to finely control the display of website content on the homepage, category pages, or other specific display areas.Understanding and effectively using this attribute can significantly improve the content operation efficiency and user experience of your website.What is the "recommended attribute" (`flag`) in Anqi CMS?In the Anqi CMS document management module, when you add or edit a document, you will find an option named "recommended properties".These attributes are not traditional classifications or tags

2025-11-08

How to configure independent SEO information and template display for a single page (such as "About Us") in the page management?

In website operation, each page has its unique value and goal.For pages such as "About Us", "Contact Us", and "Terms of Service", they often carry brand stories, core values, or important contact information, which are crucial for building corporate image and user trust.Therefore, configuring exclusive SEO information and personalized display templates for these specific pages is an effective way to enhance the professionalism and user experience of the website.AnQiCMS deeply understands these needs, providing flexible and powerful functions, allowing you to independently configure SEO information and specify personalized template display for each single page

2025-11-08

How to set custom parameters in the background and flexibly call them in the front-end template to display specific information?

In a content management system, flexibility is the key to improving operational efficiency and meeting personalized needs.AnQiCMS deeply understands this, providing powerful custom parameter functions, allowing users to flexibly expand content attributes according to business characteristics, and accurately display this information in front-end templates.This article will discuss in detail how to set custom parameters in the Anqi CMS backend, as well as how to call them in the front-end templates to create a more expressive and functional website.--- ### The Power of Custom Parameters

2025-11-08

How does the navigation settings support creating navigation at different locations to meet the diverse content display needs of the website?

In website operation, the navigation system plays a crucial role, it is not only the map for users to explore the content of the website, but also the key for search engines to understand the structure of the website.A well-designed navigation can significantly improve user experience, guide users to discover more interesting content, thereby extending visit time, and indirectly help the website's SEO performance.AnQiCMS provides a user-friendly and powerful navigation settings feature, allowing you to flexibly build various types of navigation to meet the diverse content display needs of the website.### Core Concept: Flexible Construction of Navigation AnQiCMS

2025-11-08

How to randomly get a character or value from a string or array?

In Anqi CMS template design, we often encounter the need to dynamically display content, such as randomly recommended articles, randomly displayed product images, or randomly selecting one from a set of preset keywords for display.To achieve this flexible and varied content presentation, Anqi CMS provides simple and powerful template filters, including the `random` filter that can randomly select a character or value from a string or array.Understand and master the `random` filter, which can make our website content more vibrant and fresh, effectively enhancing the user experience

2025-11-08

How to safely concatenate string and numeric variables in the AnQiCMS template?

During the development of AnQiCMS templates, we often need to combine different text segments, numerical information, and even system variables to form a complete output content, such as building dynamic links, displaying formatted data, or generating user-friendly prompt information.This process involves concatenating strings and numeric variables, and how to safely and efficiently complete this operation is an indispensable aspect of template development.AnQiCMS's powerful template engine provides a variety of flexible mechanisms to support these needs.AnQiCMS template engine syntax is similar to Django

2025-11-08

How to correctly escape special characters in the AnQiCMS template to avoid display errors?

In website content management, we often need to display text containing various special characters.If these special characters are not handled correctly, it may lead to page layout chaos, functional anomalies, and even security vulnerabilities.AnQiCMS provides a powerful mechanism to help us handle these special characters during template rendering, ensuring the correct display of content and the security of the website.

2025-11-08

How to automatically capitalize the first letter of an article title, or to achieve full uppercase/lowercase conversion?

In content operation, a standardized and unified title format is crucial for the brand image of the website and the user reading experience.To enhance visual tidiness or to meet specific design styles, automatically adjusting the case of the article title is a very practical feature.AnQiCMS as a flexible content management system, provides a convenient way to help us achieve this goal without complex programming, and it can be easily handled.

2025-11-08