In today's digital environment, many businesses and individuals need to manage multiple websites, whether it's different brand sites, product sub-sites, or multilingual versions for different markets.Faced with such needs, a system capable of efficiently handling content across multiple sites becomes particularly important.The multi-site management feature of AnqiCMS is exactly for this purpose, it allows you to easily manage multiple websites from a single backend, while ensuring that each site can independently and correctly display its exclusive content on the front-end page.
The core advantage of AnqiCMS multi-site management
First, let's understand the charm of AnqiCMS multi-site management.It has the most significant advantage of 'unified management, independent content'.Imagine that you no longer need to build a brand new CMS system for each new website, nor do you have to repeat the basic configuration settings.AnqiCMS provides a centralized management platform, where you can create, edit, and maintain all associated sites in the same backend.This not only saves you time and effort, but also makes resource sharing and data integration more convenient.
And here, 'content independence' is the foundation to ensure that each site has its own unique brand voice, product display, or service information.It means that when visitors access one of your sub-sites, they see content that is specifically designed and optimized for that site, rather than mixed information from other sites.
The first step in building an independent site: configure the server environment
To make the multi-site feature of AnqiCMS work, we first need to configure some settings on the server level.Generally, we would use reverse proxy technology to direct different domain names to the same AnqiCMS instance.This means you do not need to install multiple AnqiCMS programs on the server, one program is enough to support all sites.
For example, using a common Baota panel, you will set up a separate domain for each new site, and then point these domains through reverse proxy to the port where AnqiCMS is running (the default is 8001).When visitors access through different domain names, the reverse proxy will correctly forward the request to AnqiCMS, and AnqiCMS will then identify the corresponding site according to the domain name.
In this process, each site also needs an independent site root directory (such as/www/wwwroot/anqicms.com/publicor in the Docker environment/app/dev_anqicms.com), used to store the cache, static files, and independent data of the site, and points to AnqiCMS'spublicdirectory. This ensures the independence of files across sites.
Create and configure an independent site in the AnqiCMS backend
After the server environment is ready, the next step is to perform operations on the AnqiCMS backend.Log in to the backend of your main site, in the multi-site management feature, you will find the option to 'Add a new site'.Here, you need to fill in a series of key information for the new site:
- Site Name:Name used for backend management and identification.
- Site root directory:Specify the independent storage path of the new site on the server, which is an important identifier that distinguishes it from other sites.
- Website address:The external access domain of the new site.
- Administrator account and password:Set up independent backend management credentials for the new site to ensure permission separation.
- Database name:Specify a brand new database for the new site. This is the core of achieving content independence, as the data (articles, categories, images, etc.) of each site will be stored in its own database, without interference.If you are deploying on the same server through Docker or other methods, you can usually choose to reuse the default database account information, but the database name must be independent.
- Select the template to use:This is the key to controlling the appearance of the front page. You can choose a completely different template for a new site, or you can reuse an existing template and make personalized modifications.
After completing these configurations, the new independent site has been successfully created. You can directly enter the management interface of the new site by clicking the "Visit Backstage" button in the list and start publishing content.
The key to displaying independent content on the front page: understanding the template mechanism and data calling
How does AnqiCMS correctly display independent content on the front-end page? This is mainly due to its flexible template mechanism and intelligent data calling method.
Independent templates and themesEach site can have its own unique template theme. When you create a new site in the background, the template you choose determines the overall visual style and layout of the site.Different sites can choose completely different templates, thus presenting a completely different appearance and user experience on the front end.Template file (such as
index.html/detail.htmlAs well as static resources (CSS, JS, images) are stored in their respective template directories to ensure visual independence.Exclusive data streamDue to each site being configured with an independent database, they each have their own articles, products, categories, single pages, tags, and all other content data.This means that when you post a news article on the new site backend, it will only be displayed on this site and will not appear on other sites.This physical-level data isolation is the fundamental guarantee of content independence.
Use AnqiCMS tags to call exclusive site contentIn the AnqiCMS template, we use various built-in tags to call data. For example,
{% archiveList %}Used to get the list of articles,{% categoryList %}Used to get the category information,{% pageDetail %}Used to display single-page content. These tags automatically identify which site the current visitor is visiting by default, and automatically extract the corresponding content from the database of that site to display.For example, when a visitor visits,
brandA.comthe article list page,{% archiveList archives %}the tags will automatically be taken frombrandA.comretrieve articles from the corresponding database. Similarly, when a visitor visitsproductB.comthe product detail page of{% archiveDetail with name="Title" %}the tag will be displayedproductB.comthe title of the product onThis design greatly simplifies the development and maintenance of templates. You do not need to manually specify the data source in each template tag, the system will automatically complete the matching.
Of course, AnqiCMS also provides high flexibility. If you have special requirements, such as displaying the latest news of the main site on a sub-site, or calling data of other language versions on a multilingual site, you can explicitly use template tags.
siteIdParameters to implement cross-site data calls.For example, if you want to display the latest 5 articles from the site with ID 2 on the current site:
{% archiveList archives with type="list" limit="5" siteId="2" %} {% for item in archives %} <li><a href="{{ item.Link }}">{{ item.Title }}</a></li> {% endfor %} {% endarchiveList %}Similarly,
systemThe tag can get the system configuration of different sites,tdkThe tag can get the SEO meta information of different sites,contactTags can obtain contact information for different sites, etc., all of which support throughsiteIdspecified.Independent SEO and URL structure optimizationEach independent site has its own static rules, 301 redirects, Sitemap, Robots.txt, and home page TDK (Title, Description, Keywords) settings.This means you can carry out fine-grained SEO optimization for the target audience and keyword strategy of each site, ensuring that each site can perform well in search engines and further strengthen the independence of its content.
Seamless operation and continuous expansion
The multi-site management feature of AnqiCMS makes your operation efficient and organized.Whether it is to add a brand website, expand a regional market, or create a temporary page for a specific event, it can be easily achieved on a single platform.Content, users, permissions, SEO and other aspects have been well isolated and controlled, allowing each site to run independently and stably.
Summary
By using the multi-site management feature of AnqiCMS, you can manage multiple websites with independent content, appearance, and operational strategies with a single system architecture.From the reverse proxy configuration on the server, to the creation of independent sites in the background, and finally to the front-end page calling exclusive content through smart tags, the entire process is clear and efficient.This makes AnqiCMS a powerful and flexible content management tool, especially suitable for users who need to manage multiple online presences but also hope to maintain independent content.
Frequently Asked Questions (FAQ)
1. How does AnqiCMS achieve truly independent content between multi-sites?Content independence is mainly achieved by each site owningindependent databaseTo implement. When creating a new site in the AnqiCMS backend, you need to specify a new database name for it.Such, all the data of articles, products, categories, pages, and so on for each site are stored in their respective databases, without interference, ensuring physical isolation of content.Furthermore, each site can also