In the multi-site management feature of AnQiCMS, 'Site Root Directory' is a crucial configuration item.It is not just a simple file path, but also the foundation to ensure that each sub-site runs independently and efficiently.As an experienced website operations personnel, I fully understand the importance of correctly configuring this parameter for the stability of multi-sites and data isolation.

The main function of the "site root directory" is to provide a dedicated data storage space for each independent AnQiCMS site.This means that each sub-site's cache files, uploaded resources, logs, and other runtime-generated data will be stored in their respective root directories, thus achieving complete data isolation.This design effectively avoids data confusion and conflict between different sites, ensuring stability and security in a multi-site environment.

When AnQiCMS is deployed in a Docker container environment, such as through Baota panel or 1Panel and other tools for Docker installation, there are specific specifications for the "site root directory/app/The beginning indicates that the directory is the application path located inside a Docker container. To maintain the uniqueness and identifiability of the directory, it is usually recommended to include the domain name of the site as part of the directory name and use an underscore (_Replace the dot in the domain name.For example, if your new site domain isdev.anqicms.comthen the corresponding "site root directory" should be set to/app/dev_anqicms.com。This naming convention ensures that each Dockerized site has a clear and unique storage location for independent storage of cache and other data.

For the scenario of deploying AnQiCMS directly on the server operating system (such as Linux environment), the requirements for the "site root directory" are more flexible, but they still need to follow some basic principles.You need to create a brand new, independent directory that does not overlap with any other site directories in the server's file system for each new site./www/wwwroot/study.ykbh168.com.An essential prerequisite is that the specified directory must already be physically created on the server before the AnQiCMS configuration.If the directory does not exist, the system will not be able to initialize the file structure or store data for the new site correctly.


Common Questions (FAQ)

Q1: What are the consequences if I set the "site root directory" incorrectly?A1: Incorrect 'site root directory' setting may cause various issues, including but not limited to new sites not being accessible, chaotic cache files, data interference between different sites, and even potential data loss.In some cases, it may also prevent the site from initializing or updating correctly.

Q2: “站点根目录”是否可以与其他站点的网站根目录(Nginx/Apache配置中的root目录)相同?A2: It is not recommended to set the 'site root directory' to be the same as your web server configuration (such as Nginx or Apache).rootSet the directory to be the same.rootThe directory usually points to the publicly accessible files of a website (such as static resources, front-end code), while the "site root directory" is where AnQiCMS stores specific site data, cache, and internal files. It is usually not directly accessible to the public.Maintaining the separation of these directories helps improve security and management efficiency.

Q3: In direct server installation, can I create a "site root directory" at any location other thanwwwrootany other location?A3: Yes, you can use the file system structure and permission settings of the serverwwwrootCreate the "site root directory" at any location, as long as the directory exists and the AnQiCMS process has read and write permissions to it.Choosing a path that is easy to manage and back up is usually **practical**.