In the era of rapid digital development, many businesses and individual operators may not own just one website, but may need to manage multiple brand sites, product display pages, or niche blogs.How to ensure that the content of each site in such a multi-site environment can be independently configured, flexibly displayed, and maintained efficiently is a major challenge facing operators.AnQiCMS provides an elegant and practical solution with its powerful multi-site management function.
The AnQi CMS considers the needs of multi-site operation from the beginning, with its core concept being 'One system, multiple site operations'.This means, you do not need to deploy multiple sets of security CMS code on the server. With just one main program, 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 the independent content operation of each site.
To achieve independent configuration and display of content for each site, we can follow several core steps.
Step 1: Set up a multi-site environment to lay the foundation for content independence.
Firstly, you need to add a new site in the Anqi CMS dashboard.Assume that you have deployed and configured the main site (i.e., the default site), then the management of all 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, Secure 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 new site's domain (replacing the.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_comThis ensures that the content data of each site is completely separated and independent. - Database information reuse:If your security CMS is deployed via 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 and template binding:During the creation process, you also need to specify the "website address" (i.e., domain) for the new site and select aInitial templateThis initial template will serve as the basis for displaying content on the new site.
- Server-side configuration:After completing the background configuration, don't forget to set up reverse proxy for the new site on your server side (for example, BtPanel or Nginx/Apache configuration). The target address usually points to the port where the Anqi CMS is running (default is 8001), and make sure that the running directory of the new site points to its
/publicSubdirectory for proper handling of front-end requests.
Through the above steps, each site has its own storage space and database, ensuring the independence of content from the root.
Step 2: Refine the configuration of each site's content, achieving deep customization
After setting up the multi-site environment, you can enter the independent backend management interface for each site to perform fine-grained configuration at the content level.
- Independent backend management:Each newly created site will have its own independent backend login entry and administrator account password.You can directly enter by clicking the "Access Backend" button in the "Multi-Site Management" list, or by accessing the path "YourDomain/system/".This means that the operation teams of different sites can independently manage their own content without interference.
- 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.).
- Publish independent documents:Each site's 'Document Management' module is completely independent, allowing you to create, edit, and publish exclusive articles, product information, and more for each site.
- Manage independent categories and tags:Categories and tags are important ways to organize content. Each site can have its own independent category system and tag library, ensuring the professionalism and accuracy of content categorization.
- Create an independent single-page:The content of single pages such as 'About Us' and 'Contact Us' is independent on each site and can be displayed differently according to the brand characteristics.
- Personalized template selection and content association:
- Site-level template:When creating a new site, you have already selected a default template.This is just the beginning.Each site can flexibly switch between different template themes from its "Template Design" backend, completely changing the overall appearance and user experience of the site.
- Content-level template:The 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 specific articles or products, for example, creating a
download.htmlThe template is used to display the download page, while other articles still use the default.detail.html. - Category Template:In the 'Document Category' management, you can set an independent 'Category Template' for each category (for example,
news_list.htmlYou can even set 'Apply to subcategories' so that lower-level categories also inherit the template. You can also specify a default 'Document template' for documents under this category. - Single Page Template:For a specific single-page, you can choose a custom "single-page template", such as specifying for the "About Us" page
about_us.htmltemplates.
- Document template:When publishing or editing a document, you can specify an independent "document template" for specific articles or products, for example, creating a
Through these fine-grained configuration options, all content elements of each site can be managed and presented independently and individually.
Step 3: Independent Front-end Display and Advanced Application
In the frontend, the template engine of Anqi CMS will automatically load the corresponding template and content based on the current visited site, thus achieving a completely independent page display.
- Default independent display:Due to the isolation of backend configuration and data storage, when users access different domain names of the site, Safe CMS will automatically identify the current site based on the domain name and load the associated template and content of the site.This is the core manifestation 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 during template creation, for example:
/template/defaultor/template/my_brand_theme.These directories contain HTML files for the home page, model home page, detail page, list page, and so on.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 quick location and modification. Furthermore, you can also utilize{模型table}/list-{分类id}.htmlorpage/{单页面id}.htmlSuch custom naming rules create unique display templates for specific categories or single pages and specify their application in the corresponding content management section on the backend.
- Conventional Naming:Template Support
- Flexible template tags:The Django template engine of AnQi CMS provides a rich set of template tags for dynamically retrieving and displaying content.These tags can work independently across different sites, obtaining exclusive data for each site.
{% archiveList %}Tags at site A will list articles from site A, and at site B, it will list articles from site B. - Cross-site content calls (optional but powerful):Although our goal is to display independently, in certain special scenarios, you may wish to display some content of B site on A site.The Anqi CMS also supports this advanced application.
archiveDetail/categoryDetail/pageDetailAll of the following provide asiteIdParameters. By explicitly specifying in the tag.siteIdYou can call and display specific content from other sites within the current site.This is usually only used for specific needs of data integration or content aggregation. Unless necessary, it is not recommended to overuse this feature to maintain the independence of the site.
By the above configuration and techniques, you can achieve highly independent configuration and flexible display of content in the multi-site environment of Anqi CMS, thereby meeting various operational needs.
Common Questions and Answers (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.The 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 'Home TDK Settings' backend of each site.