In today's rapidly developing digital age, many enterprises and individual operators may not own just one website, but may need to manage multiple brand sites, product display pages, or niche blog sites.How to ensure that each site's content in such a multi-site environment can be independently configured, flexibly displayed, and maintain efficient management, which is a major challenge for operators.AnQiCMS (AnQiCMS) takes advantage of its powerful multi-site management features to provide an elegant and practical solution for this.
The Anqi CMS was designed from the beginning to consider the needs of multi-site operation, its core concept is 'one system, multi-site operation'.This means that you do not need to deploy multiple sets of safe CMS code on the server, you only need one main program, and you can easily create and manage multiple independent websites through the "multi-site management" feature in the backend.This architecture not only greatly simplifies the deployment and maintenance work, but more importantly, it lays a solid foundation for independent content operations for each site.
To achieve independent configuration and display of content across sites, we can follow several core steps.
Step one: build a multi-site environment to lay the foundation for content independence.
First, you need to add a new site in the Anqi CMS backend.Assuming you have deployed and configured the main site (i.e., the default site), all management of child sites will begin here.
- Add a new site:Log in to the main site backend, navigate to the "Multi-site Management" feature. Here, you can click "Add New Site" to start the configuration process.
- Independent storage and data isolation:When creating a new site, AnQi CMS will require you to specify an independent "site root directory" and "database name" for the new site.
- Site root directory:This is a key setting used to store cache, uploaded files and other data for the new site. It is recommended to start with
/app/and combine it with the domain name of the new site (replace the dot.with an underscore_) to name it, for example/app/dev_anqicms_comEnsure that each site's data is isolated and does not interfere with each other. - Database name:Similarly, allocate a separate database name for the new site, for example
dev_anqicms_com. This ensures that the content data of each site is completely separated and independent. - Database information reuse: If your CMS is deployed using Docker, you can directly select 'Reuse default database account information' to avoid the trouble of repeating database connection configuration.
- Site root directory:This is a key setting used to store cache, uploaded files and other data for the new site. It is recommended to start with
- Domain binding with template:During the creation process, you also need to specify the 'website address' (i.e., the domain) for the new site and select aInitial templateThis initial template will serve as the basis for the new site content.
- Server-side configuration:After completing the background configuration, don't forget to set up reverse proxy for the new site on your server side (such as Baota panel or Nginx/Apache configuration). The target address usually points to the port where the AnQi CMS is running (default 8001), and make sure the running directory of the new site points to its
/publicSubdirectory, so as to correctly handle front-end requests.
Through the above steps, each site has its own independent storage space and database, ensuring the independence of content from the root.
The second step: fine-tune the configuration of each site's content to achieve deep customization
After the multi-site environment is set up, you can enter the independent backend management interface for each site to fine-tune the content configuration.
- Independent backend management: Each new site will have an independent backend login entry and an administrator account password.You can directly enter by clicking the "Access Backend" button in the "Multi-site Management" list, or by accessing the path "Your domain/system/".This means that the operation teams of different sites can independently manage their own content without interfering with each other.
- Content Model and Type:The 'Flexible Content Model' of AnQi CMS is the foundation for deep content customization.Each site can customize the content model according to its own needs (for example, article model, product model, case model, etc.).On this basis, you can access the background of your respective sites:
- Publish Independent Document:Each site's 'Document Management' module is completely independent, you can create, edit, and publish exclusive articles, product information, and more for each site.
- Manage independent categories and tags:Categories and tags are an important way to organize content. Each site can have its own independent classification system and tag library to ensure the professionalism and accuracy of content classification.
- Create an independent single-page:The content of single pages such as "About Us", "Contact Us", etc. is independent on each site and can be displayed differently according to the brand characteristics.
- Personalized template selection associated with content:
- Site-level template:When creating a new site, you have already selected a default template.But this is just the beginning. Each site can flexibly switch between different template themes from its background "template design", completely changing the overall appearance and user experience of the site.
- Content-level template:AnQi CMS also supports applying templates to finer-grained content, which greatly enhances the independent display capabilities of the content:
- Document template:When publishing or editing a document, you can specify an independent "document template" for a specific article or product, for example, create a
download.htmlThe template is used to display the download page while other articles still use the default onedetail.html. - Category template:In the document category management, you can set an independent 'category template' for each category (such as
news_list.html), even it can be set to 'Apply to child categories', so that its lower-level categories can inherit the template. At the same time, you can also specify the default 'Document Template' for the documents under the category. - Single page template: For a specific single page, you can choose a custom single page template, for example, specify the 'About Us' page
about_us.htmlTemplate.
- Document template:When publishing or editing a document, you can specify an independent "document template" for a specific article or product, for example, create a
Through these fine-tuned configuration options, all content elements of each site can be managed and presented independently and individually.
Step 3: Front-end independent display and advanced applications
On the front end, the Anqi CMS template engine automatically loads the corresponding template and content based on the current visited site, thus achieving completely independent page display.
- Default independent display: Due to the isolation of background configuration and data storage, when users access different site domains, Anqiz CMS will automatically identify the current site based on the domain and load the associated templates and content of the site.This is the core embodiment of its 'multi-site' function, ensuring the independent operation and content presentation of each site.
- Template directory structure:Each template theme has an independent directory structure when creating templates, for example:
/template/defaultor/template/my_brand_themeThese directories contain the HTML files for the homepage, model homepage, detail page, list page, and others.By modifying these template files, you can create a unique visual style and layout for each site.- Conventional naming:Template support
{模型table}/index.html/{模型table}/detail.htmlConventional naming conventions for easy location and modification. Furthermore, you can also make use of{模型table}/list-{分类id}.htmlorpage/{单页面id}.htmlSuch a custom naming rule, creates a unique display template for a specific category or single page, and specifies application in the corresponding content management section in the background.
- Conventional naming:Template support
- Flexible template tags: The Django template engine of Anqi CMS provides rich template tags for dynamically retrieving and displaying content.These tags can work independently on different sites, obtaining exclusive data for each site. For example,
{% archiveList %}Tags on site A will list articles from site A, and on site B, it will list articles from site B. - Cross-site content calls (optional but powerful):Although our goal is to display independently, but in some special scenarios, you may want to display part of the content of site B on site A.AnQi CMS also supports this advanced application. Most content-related template tags such as
archiveDetail/categoryDetail/pageDetailAll) provide asiteIdSpecify through the tag.siteIdYou can call and display specific content from other sites on the current site.This is usually only used for specific needs of data integration or content aggregation, and it is not recommended to overuse this feature unless necessary to maintain the independence of the site.
By using the above configuration and techniques, you can achieve highly independent content configuration and flexible display in the Anqi CMS multi-site environment, thereby meeting various operational needs.
Frequently Asked Questions (FAQ)
- Q: Can I set different SEO strategies for each site in the AnQi CMS multi-site environment, such as independent TDK and pseudo-static rules?A: Of course you can. Anqi CMS has independent backend management for each site under a multi-site architecture.You can configure unique titles (Title), keywords (Keywords), and descriptions (Description) in the background of each site's home page TDK settings.At the same time, under "Function Management" and "URL Rewrite Rules", each site can also independently select or customize URL rewrite rules, even configure independent Robots.txt and Sitemap, to ensure that each site can have a tailored experience