First from/downloadDownload AnQiCMS Linux installation package.
Method one: Install multiple AnQi CMS using the multi-site feature
AnQiCMS does not need to duplicate the AnQiCMS code when installing multiple sites on a single server. Please follow the operation process below to add multiple sites.
- In the left menu of the Baota panel, click on
网站
Menu, clickPHP项目
Add a PHP site, fill in the domain name resolved to the server in the site creation, the root directory can be left as default, copy the root directory address, it will be used in the next step, do not create FTP and database, and choose static PHP version.Submit the last click.
- Log in to the site admin backend, click on the left menu
多站点管理
Menu (only sites with default installation have multi-site management permissions).In the multi-site management interface, click the Add New Site button.In the popup window, fill out the form according to the actual information./www/wwwroot/study.ykbh168.com
The new directory needs to be created on the server in advance; fill in the new website URL, and this URL also needs to be parsed to the server in advance.The admin account and admin password are the same as the new site admin account and password; the database name should be a new database, do not fill in the database of an existing site, otherwise it will cause data overwrite. If the default installation uses the root account to install, you can choose to reuse the database account to avoid filling in account information.Click the OK button last to complete the creation of the new site.
- In the tower, click the settings in the newly created website operation bar, select in the pop-up interface,
网站目录
change the running directory to,/public
Click save. As shown in the figure:
- Static Setting Configuration
- Nginx Reverse Proxy Settings
Select伪静态
Menu, fill in the static configuration rules, and click Save. You can also click Save As Template for convenience in future use:
location @AnqiCMS {
proxy_pass http://127.0.0.1:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 404 =200 @AnqiCMS;
location / {
try_files $uri $uri/index.html @AnqiCMS;
}
- Apache configuration of pseudo-static
If you are using Apache software, the pseudo-static rules will be inconsistent. Leave the pseudo-static field blank, select reverse proxy, and fill in the target URL in ithttp://127.0.0.1:8001
as shown in the figure:
This new site has been added.
Method two: Install multiple AnQi CMS using the source code
The Baota Panel 7.9.3 version and above support faster deployment and it is recommended to upgrade Baota Panel to version 7.9.3 or above.
Create directories and upload installation packages
- Click the left menu's
文件
Menu, switch to directory to/www/wwwroot/
Directory, inwwwroot
Create a new directory under the directory, the directory is generally named after the domain name, such asanqidemo.com
. As shown in the figure:
- Click
anqidemo.com
to accessanqidemo.com
folder, and upload the Linux installation packageanqicms-linux-v3.x.x.zip
to the current directory. Right-click on the installation packageanqicms-linux-v3.x.x.zip
and select Extract to unzip the installation package into the current folder. As shown in the figure:
After unpacking, rename the directory at the root.anqicms
Toanqidemo
Please note: When installing multiple copies of the security CMS source code on the server, the main program name must not be duplicated, otherwise it may not be possible to start the program.
Configure config.
When installing multiple copies of the AnQi CMS source code, you need to manually add config. to make it use a different port. Each program will occupy a port, and ports cannot be reused.8002
Then we create a config. in the root directory of the website, with the following content:
{
"server": {
"site_name": "安企内容管理系统(AnqiCMS)",
"env": "release",
"port": 8002,
"log_level": "info",
"token_secret": ""
}
}
This step can be skipped, and then add the corresponding port to the execute command in the Baota panel.
Deployment of Baota Panel 7.9.3 or above:
Click the left menu's网站
Menu, clickGo项目
to the Go project website creation page, click添加Go项目
Button, configure in the pop-up window./www/wwwroot/anqidemo.com/anqidemo
; Enter project name.AnQICMS
; Enter project port.8002
; This is the port we set in the previous step. Enter the command here./www/wwwroot/anqidemo.com/anqidemo
; Select the running userwww
Check the 'Start on Boot' option and fill in the notes as needed, the default settings are fine; enter the domain name you have resolved to the server.Complete the entry and click the submit button to finish adding.
If you did not manually configure config. in the previous step, you can also specify the port in the command execution, the format is-port {端口号}
:
[en]Please ensure that the port entered here is the same. For example, if the project port is set to 8002, then the port for executing the command must also be 8002.
[en]For example, the original command is:/www/wwwroot/anqidemo.com/anqidemo
[en], then the executing command changes to:/www/wwwroot/anqidemo.com/anqidemo -port 8002
.
Initialize installation website
Visit the domain you have bound in the browser, go to the AnQICMS initial installation interface, fill in the database information, background account password information, and website address. As shown in the figure:
If the installation fails, the following situations may occur: 1, the database account password is incorrect, please recheck the database account password.2. Database account does not have sufficient permissions to create a database. Please create the database in advance or use an account with higher permissions.3.Administrator password is too short, please set a more complex password.
After installation, visit the front desk and back office, and check if everything is normal.
If the installation fails, the following situations may occur: 1, the database account password is incorrect, please recheck the database account password.2. Database account does not have sufficient permissions to create a database. Please create the database in advance or use an account with higher permissions.3.Administrator password is too short, please set a more complex password.
After installation, visit the front desk and back office, and check if everything is normal.