As a website operator who is well-versed in the operation of AnQiCMS, I am well aware of the importance of an efficient and stable content management system for the development of a company.AnQiCMS with its high-performance architecture based on Go language, flexible content model, and SEO-friendly design, provides an excellent solution for small and medium-sized enterprises and content operation teams.It is dedicated to making website deployment simple, operation secure, interface elegant, and with extremely fast execution speed, effectively avoiding many potential security issues.
For many operators, deploying and managing a CMS system on the server, especially when it involves Docker container technology, may seem somewhat complex.幸运的是,借助像 aaPanel(宝塔面板国际版)或宝塔面板这类流行的服务器管理面板,AnQiCMS 的 Docker 一键部署流程变得异常简便。Next, I will elaborate on how to easily deploy AnQiCMS on these panels using Docker.
Deploy AnQiCMS on the aaPanel dashboard
aaPanel, that is the international version of Baota Panel, provides a consistent panel management experience for users worldwide.Deploy AnQiCMS on aaPanel, we first need to ensure that the panel itself is installed correctly.If you have not installed aaPanel yet, please visit its official website to get the latest installation instructions and follow the instructions to complete the installation on your server.
Deploying AnQiCMS application, we need to use the Docker feature of aaPanel.After installing aaPanel, please navigate to the "Container" option in the left menu and select the "Container" tab page.Click the "Create Container" button, a new configuration interface will pop up.anqicmsAs a container name. In the "Imageanqicms/anqicms:latest。Port configuration is crucial, please set the "server" and "container" ports in the "Exposed Ports" section8001If you plan to deploy multiple AnQiCMS instances on the same server, the server port of subsequent instances should increase sequentially, for example8002/8003, but the container port should remain the same8001.Continue scrolling down, at the 'Restart Rules' section, it is recommended to select 'Restart after failure' or 'Restart if not manually stopped' to ensure the continuous availability of the service.Finally, click the "Confirm" button, and the creation of the Docker container will begin.
After the container is created, we need to configure the reverse proxy of the website so that we can access AnQiCMS via the domain name.Please click on the "WebsiteIn the pop-up window, select the "Reverse Proxy" type.test.anqicms.com。And the 'Proxy Address' should be filled in127.0.0.1:8001This port number must match the server port you previously configured for the AnQiCMS Docker container.After completing these settings, click “Confirm” to create a reverse proxy site.
Now, you can enter the domain name you configured in the browser, for examplehttp://test.anqicms.com/Visit the initialization installation interface of AnQiCMS.After completing the database information and administrator account settings according to the prompts, your AnQiCMS website can be put into use./system/for examplehttp://test.anqicms.com/system/.
Deploy AnQiCMS on the Baota panel
Before installing AnQiCMS, we first need to install MySQL database in the Docker environment.Find the "DockerAfter installing Docker service, search and install MySQL in Docker's app store.For servers with less than 2GB of memory, it is recommended to choose MySQL version 5.6, otherwise, the default installation of version 5.7 is sufficient.Install and make sure to select 'Allow external access'.After installation, click on the "Details" link of MySQL, copy the password of the root user, because it will be used later when deploying AnQiCMS.
Then, search in Docker's app store.anqicmsAfter finding the results, click the 'Install' button to enter the installation interface. On the installation interface, you need to fill in the following key information:
- Website domain name: For example
www.anqicms.com. - Database name:Default
anqicms. If you plan to deploy multiple AnQiCMS instances, each instance requires a separate database name, please modify it, for exampleanqicms_site2. - Database passwordFill in the root user password you previously copied from the Docker version MySQL details.
- Port:Default
8001Similarly, if deploying multiple instances, please allocate a different port number for each instance, such as8002/8003etc.
Click "OK" to start deploying AnQiCMS.This process usually takes 1 to 5 minutes, please be patient./system/To access the AnQiCMS backend management interface, for examplehttp://dev.anqicms.com/system/。Default administrator account isadminand the password is123456。After the first login, it is strongly recommended that you change these default credentials immediately to enhance security.
BtPanel multi-site deployment AnQiCMS advanced
You may need to run multiple websites through the same Docker AnQiCMS container on the same server.This can be achieved through the reverse proxy function of Baota panel and the built-in multi-site management function of AnQiCMS.
First, navigate to the "Website" menu on the left side of the Baota panel, select the "Reverse Proxy" tab page, and click "Add Reverse Proxy". In the pop-up window, enter the domain name of the new site you want to add, for example,newsite.anqicms.com。目标 URL 则指向你的 AnQiCMS Docker 容器,通常是 Englishhttp://127.0.0.1:8001。点击“确定”完成反向代理站点的创建。 English
Next, log in to the AnQiCMS backend you have deployed (usually the first one deployed, as it has multi-site management permissions), find and click "Multi-site Management
- Site NameEnglish: According to the actual situation, fill in the content to distinguish it.
- Site Root DirectoryEnglish: As AnQiCMS is deployed in a Docker container, the default root directory is
/app/. To ensure the independent storage of new site data, you need to create a unique subdirectory based on this, for example,/app/newsite_anqicms_com. Note that the dots in the domain name are usually replaced with underscores. - Website address:Enter the complete domain name you have configured for the new site, for example
http://newsite.anqicms.com. - Administrator account password:Set up a separate administrator account and password for the new site's backend.
- Database nameSimilarly, assign a unique database name for the new site, for example
newsite_anqicms_com. - Database information reuseSince AnQiCMS is deployed in a Docker environment, you can usually directly select 'Reuse default database account information' because the AnQiCMS container has permission to access its internal MySQL.
- Select the template to useSelect a default template for the new site.
Click the "OK" button to complete the creation of the new AnQiCMS site. You can directly enter the background management interface of the new site by clicking the "Access Backend" button in the multi-site management list, or directly enter the domain name of the new site in the browser followed by/system/Access it.
By following these steps, whether you choose aaPanel or Baota panel, you can easily achieve Dockerized deployment and management of AnQiCMS, making your content operation work more efficient and convenient.
Common Questions (FAQ)
1. How to handle it if the Docker container fails to start or cannot be accessed when deploying AnQiCMS?If the Docker container fails to start, first check if the Docker service is running normally.Then, check the container logs, which usually contain error information, such as port conflicts, failed image pulls, or configuration errors.lsof -i:{端口号}命令(Linux System)查找并结束占用端口的进程。If it is the first installation, be sure to check whether the MySQL database is installed correctly, especially whether the root password is correctly provided to AnQiCMS.Finally, ensure that the proxy address and port in the reverse proxy configuration match the actual address and port that the Docker container is listening on.
2. How to deploy multiple AnQiCMS instances on a single server with each instance having its own database?On the Baota panel or aaPanel, deploy an independent Docker container for each AnQiCMS instance and ensure that each container maps to a different server port (e.g., 8001, 8002, 8003).Each container should specify a different database name during installation.Configure an independent reverse proxy site for each container in the panel, and point its domain to the respective server port.So, each AnQiCMS instance will have an independent runtime environment and database.
3. How should the "site root directory" be filled in when creating multiple sites in the AnQiCMS backend?When AnQiCMS runs in a Docker container, its file system path is different from the host. Therefore, when creating a new site in the AnQiCMS background multi-site management, the "site root directory" should be filled with the internal path of the container, usually with/app/Start. To ensure data isolation and uniqueness, it is recommended to add/app/a subdirectory named after the new site domain (replace dots with underscores), for example/app/newsite_anqicms_com. AnQiCMS will store the cache, configuration files, and other data of the site at this specified path within the container.