AMH is a Linux server and virtual host management system that enables web-based server control and management. This topic describes how to set up an AMH website for a production environment on the Linux operating system.
Software versions
- Operating system: In the example provided in this topic, CentOS 7.6 is used.
- PHP: A server-side scripting language embedded in HTML documents. In the example provided in this topic, PHP 7.0.33 is used.
- AMH: In the example provided in this topic, AMH 6.2 is used.
Prerequisites
A Linux instance is purchased, and the associated security group has an inbound rule configured with the TCP protocol and port 8888, as shown in the following table.
Step 1: Download and install AMH
- Execute the following command to download AMH.
- The following output is displayed:
-
- Enter 1 and press Enter to complete the installation.
- After the installation is successful, the following output is displayed. Record the AMH address and the usernames and passwords for the AMH administrator and the database.
-
tip
If you forget your password, you can execute the amh amh-6.2 admin change_amh_password new_pass command (replace new_pass with your desired password) to specify a new password.
Step 2: Access and configure AMH
- Enter http://<ECS instance EIP>:8888 in the local browser to access AMH.
- If the following output is displayed, AMH is set up successfully.
- Enter the account and password of the AMH administrator as prompted.
- If the following output is displayed, the login is successful.
- Configure the virtual host.
- Click lnmp01 in the "LNMP Environment List".
- The virtual host configuration page is displayed. Specify a value for the "Host identifier domain" and "Associated domain" parameters and retain the default settings for other parameters. As shown in the following figure, click the "Save" button.
tip
- If you use an IP address to access the virtual host, you can enter the IP address in both the "Host identifier domain" and "Associated domain" fields.
- If you use a domain name to access the virtual host, make sure that an ICP filing is complete for the domain name and the domain name is resolved to your ECS instance.
- Follow the path below and click the "Download and install" button.
- After the installation is complete, click "Database > phpAdmin management", and then click the "phpAdmin" button.
- Go to the database homepage and click the "Account" button in the right navigation bar.
- Click the "Add user account" button. Configure the parameters as shown in the following figure, select "Create a database with the same name as the user and grant all database permissions to the user", and then click the "Execute" button at the bottom to create the database and account.
- Follow the path below and click the "Manage" button.
- Select all options and click the "OK" button
- After the installation is complete, click "FTP Management > Account Management" and add a new FTP account.
- Enter the account information and click the "Save" button.
- Click the "File Management" button corresponding to the account.
- Enter the FTP username and password, and then click the "Log in" button.
- Select the default homepage files ErrorPages and index.html in AMFTP, and then click the "Delete" button, as shown in the following figure.
- Upload website files. In the example provided in this topic, DEDECMS files are uploaded. You can upload system files based on your business requirements.
- Select the DEDECMS files, and click the "Intelligent Extraction" button.
Step 3: Install the website
- Select "I have read and agree to this agreement", and then click the "Continue" button.
- Perform an environment check, and then click the "Continue" button.
- Configure the administrator username and password, and then click the "Continue" button.
- After the installation is complete, the following output is displayed, indicating that the installation is successful.
- Click the "Visit website homepage" button to access the website homepage.
- Click the "Log in to website backend" button to access the backend management page of the website.
Step 4 (Optional): Enable HTTPS for the website.
When a user accesses your website over the HTTP protocol, the browser warns the user that the connection is not secure. We recommend that you enable HTTPS secure communication for your website. This ensures encrypted data transmission between users and your website, effectively defending against network hijacking, information leakage, and other threats.