As an experienced CMS website operation person, I fully understand that the core value of a content management system lies in the efficient and convenient management of content, and the stability and security of the website backend are the foundation of all this.For users who install AnQi CMS via Docker on the Baota panel, how to access the background management interface smoothly through a custom domain is a crucial step to ensure the smooth conduct of daily operations.
The AnQi CMS is developed using Go language, which is favored for its high performance and security.Deploying security CMS in the Baota Docker environment typically involves encapsulating core services within containers and providing services through specific ports.8001Port. It is particularly important to use the Baota panel's reverse proxy feature to allow external domains to access this internal service.
Ensure that the Safe CMS is deployed in Baota Docker.
Firstly, we need to confirm that the Safe CMS has been successfully installed and running through the Baota panel's Docker App Store.During the installation process, you may have already filled in the 'Website Domain' and 'Port' information in the Docker application configuration interface.dev.anqicms.comFill in the website domain, and specify the container port as8001.The Docker App Store of Baota Panel usually automatically creates a reverse proxy site associated with the domain under the "Website" menu when installing AnQiCMS.This is a critical step to ensure that the domain name can directly point to the AnQiCMS service inside the Docker container.
Configure the website and reverse proxy of the Baota panel
Even if the Tower has automatically configured the reverse proxy when installing Docker applications, we should still understand its working principle and how to check or manually adjust it.
You need to access the left menu of the Baota panel, select the "Website" function. Here, you should see a domain (such asdev.anqicms.comCorresponding website entry.If the site does not exist, or you need to bind other domains to this AnQiCMS instance, you can create it by clicking "Add Site" or "Reverse Proxy".
When creating or editing a reverse proxy site, the most core configuration is the "target URL". Since AnQiCMS runs in a Docker container inside8001Port, and Docker containers typically access services on the host machine through127.0.0.1(i.e., the local loopback address) to access services on the host machine, therefore the target URL needs to be set tohttp://127.0.0.1:8001This tells Baota panel that when external users access through your domain name, the request should be forwarded to the local8001port, that is, the Docker container where the Anq CMS is located.
After completing these configurations, please make sure to click the "OK" or "Save" button, and ensure that your domain has been correctly resolved to the server's IP address.
Access the AnQiCMS admin interface
Once the domain resolution and Baota panel reverse proxy configuration are correct, you can access it through your bound domain plus/system/Path to access the security CMS backend interface.
For example, if your domain ishttp://dev.anqicms.com/, then the background access address ishttp://dev.anqicms.com/system/. Enter this address in the browser, and you will see the login interface of the Anqi CMS. After the first installation, you may need to perform initial settings, or use the default administrator accountadminand password123456Log in (strongly recommended to change the default password immediately after login to enhance security).
Enhance backend security: Customize the backend domain name
English CMS v2.1.1 and higher versions provide a feature to enhance backend security: Custom backend domain.This feature allows you to specify an independent backend access domain within the Anqi CMS system./system/Can access the backend login page, but if the system is configured with a custom backend domain name, you will only be able to access the backend through that specific domain name.
To enable this feature, you need to go to the "Global Feature Settings" under "Background Settingshttps://admin.anqicms.com.Please note that before configuring this domain in the AnQi CMS backend, you must ensure that the domain has been resolved to the server IP, and the corresponding website and reverse proxy have also been configured on the Baota panel, pointing to the port of the AnQi CMS Docker container.This measure can effectively limit the back-end entry and further enhance the security of the website.
Common Questions and Answers (FAQ)
问:I have configured reverse proxy, but when accessing the background through the domain, a 502 error occurs. What is the cause?答:502 Bad Gateway error usually indicates that Baota's reverse proxy failed to successfully connect to the AnQiCMS Docker service on the backend. You need to check several aspects:
- Confirm that the AnQiCMS Docker container is running. You can check the container status under the 'Docker' menu in the Baota panel.
- Check if the target URL of the reverse proxy is correct. Make sure it points to
http://127.0.0.1:8001(or the port that your AnQiCMS container is actually listening on). - Confirm that the AnQiCMS container port is not occupied by other services on the host. You can use SSH terminal to
lsof -i:8001Command (replace 8001 with your port) to check port usage situation. - Check if Nginx or Apache's rewrite rules are properly configured for the domain in the Baota panel, although Docker installation usually handles it automatically, manual verification may still be required.
问:How do I configure if my AnQiCMS Docker container port is not the default 8001?答:If you have customized the port (such as 8002) during the installation of AnQiCMS Docker container, then when configuring reverse proxy in Baota panel, the target URL should also be changed accordingly.http://127.0.0.1:8002.In addition, if you have set a custom backend domain in the "Global Function Settings" within AnQiCMS and this domain needs to use a different port, you also need to ensure that Baota's reverse proxy points to the correct port.
问:What is the difference between the 'Custom Backend Domain' feature of Anqi CMS backend and Baota's reverse proxy?答:The reverse proxy of Baota is to forward external domain name requests to the internal Docker service ports at the server level, which is to implement domain name access to Docker containersInfrastructure layerConfiguration. The "Custom Backend Domain" feature of the Anqi CMS backend isApplication layerThe configuration, it tells the AnQiCMS application to only respond to background access requests from specific domain names.This means that even if other domains can be successfully forwarded to AnQiCMS through the Baota reverse proxy, if AnQiCMS has set a custom backend domain internally, requests from non-designated domains will not be able to enter the backend interface, thereby providing additional security protection.In simple terms, reverse proxy allows your domain to "find