I'm glad to elaborate on this common but somewhat tricky issue in website operation.The AnQi CMS, as a modern content management system developed based on the Go language, usually has a different deployment method from traditional PHP environments.When you face a version of Baota panel that does not directly provide deployment options for 'Go projects', indeed some clever strategies are needed.Don't worry, this does not mean you cannot enjoy the efficiency and convenience of AnQiCMS. We have ways to ensure it runs stably on your server.

Understanding the challenge: Why is the 'Go project' option missing?

Firstly, we need to understand why some Baota panel versions do not directly support "Go projects".This is usually because the execution mechanism of Go language applications is different from that of scripting languages like PHP.PHP applications require a PHP interpreter and a web server (such as Nginx, Apache) to work together, while Go language applications are typically compiled into standalone binary files that can start an HTTP service themselves.The Baota panel's newer version integrates the management of the Go language runtime environment, providing a one-click 'Go project' deployment interface, simplifying process guardianship and reverse proxy configuration.And the older versions require us to manually perform these configurations, which is exactly what we are good at as operation experts.

Deployment Strategy One: Make good use of the 'Other Projects' feature of the T塔 panel.

Even without a dedicated 'Go project' entry, the 'Other Projects' or 'General Projects' feature of Baota panel is still a powerful assistant for deploying AnQiCMS.This feature allows you to manage any executable program as a project, and configure the necessary runtime parameters and domain bindings for it.

1. File Preparation and Upload:Firstly, you need to download the installation package suitable for the Linux environment from the official channel of AnQiCMS. Usually, this is a package with.zipor.tar.gzThe compressed file at the end. Then, log in to your Baota panel and click on the 'Files' option in the left menu. Navigate to/www/wwwroot/Catalog, create a dedicated folder for AnQiCMS, for exampleyourdomain.comUpload the downloaded AnQiCMS installation package to this folder and unzip it. After unzipping, you will see a folder namedanqicms(or similar name) executable file, this is the core program of AnqiCMS.

2. Add a 'General Project':Now, go back to the left menu of the panel, click 'Website', and then find the entry for 'Other Items' or 'General Items'. Click the 'Add General Item' button, and in the pop-up configuration interface, you need to carefully fill in the following information:

  • Project executable file:Enter the full path of the executable file of the AnQiCMS you just extracted, for example/www/wwwroot/yourdomain.com/anqicms.
  • Project Name:Give your AnQiCMS site a recognizable name, for exampleAnQiCMS-Main.
  • Project Port:AnQiCMS default listens on port 8001. Here you can fill in8001If there is already another program occupying this port on your server, you can find it in the AnQiCMS installation directory.config.jsonModify the listening port of AnQiCMS in the file, and fill in the modified port number here.
  • Execute command:Similarly, fill in the full path to the AnQiCMS executable file, for example/www/wwwroot/yourdomain.com/anqicmsThe binary files of Go language can usually be executed directly as commands.
  • Run as user:Generally chosenwwwThe user can do so.
  • Boot up:Ensure this option is checked to make sure that AnQiCMS service can automatically resume after server restart.
  • Domain binding:Enter the domain name you have parsed to this server, for examplewww.yourdomain.com.

After completing the configuration, click the "Submit" button. The Baota panel will start the AnQiCMS service and automatically set up process protection.

3. Configure reverse proxy:Although the General Project has launched AnQiCMS, it listens to the internal port by default (such as 8001).To allow users to access your website through standard HTTP/HTTPS ports (80/443), we need to configure a reverse proxy.Find the domain you just bound in the 'Website' list on the Baota panel, click the corresponding 'Settings' button.After entering the settings page, select the 'Reverse Proxy' tab and click 'Add Proxy'.

  • Proxy Name:Fill in freely, for exampleAnQiCMS-Proxy.
  • Target URL:Fill inhttp://127.0.0.1:8001(If the AnQiCMS port has been modified, please fill in the corresponding port).
  • Send domain:Choose$host. After saving the configuration, your Nginx or Apache server will forward all requests to the AnQiCMS service on port 8001 for your domain.

Deployment Strategy Two: Manual deployment via command line (more flexible solution)

If you find the functionality restrictions of the Baota panel inconvenient, or if you wish to have more precise control, you can completely manually deploy AnQiCMS through the command line and combine it with process guard tools and web server configuration.

1. File Preparation and Upload:Similar to deploying on the Baota, download the AnQiCMS Linux installation package, and upload it to the specified directory on the server using SSH tools (such as Xshell, PuTTY), for example/data/wwwroot/anqicms/Extract the installation package.

2. Process guardianship and auto-start:The AnQiCMS installation package usually comes withstart.shandstop.shscript to start and stop the program. To ensure that AnQiCMS runs continuously and can automatically recover after server restarts, we can use Linux'scrontabSet up a scheduled task to check and start every minute.

  • Log in to the server via SSH and executecrontab -ea command.
  • In the opened editing interface, add the following line:
    
    */1 * * * * /data/wwwroot/anqicms/start.sh
    
    (Please replace)/data/wwwroot/anqicms/Replace with your actual AnQiCMS installation path)
  • Save and exit (usually)wq). Then manually execute the startup script once:./start.shSo, even if the AnQiCMS program stops unexpectedly, crontab will automatically detect and restart it within a minute.

3. Configure Nginx/Apache Reverse Proxy:This is a critical step to expose AnQiCMS service to external access. You need to edit your web server (Nginx or Apache) configuration file.

  • Nginx configuration example:Find the Nginx configuration file corresponding to your domain (usually in/etc/nginx/conf.d/or/www/server/nginx/conf/vhost/). InserverAdd or modify the following content in the block: "`nginx server {

    listen 80;
    server_name www.yourdomain.com; # 替换为您的域名
    
    
    # AnQiCMS的根目录通常为public,但Go应用直接监听