first of all, what products did you buy from Aliyun? If it is a cloud service, can the ECS, log in to the server to modify the configuration file of apache? If it is a cloud virtual host, you can't log in to the server, so you can't use it below. Ask me again.
1. First of all, find the configuration file of apache. Generally speaking, the default path is / etc/httpd/conf/httpd.conf
(the path is based on the actual installation directory of apache), and edit it.
vim /etc/httpd/conf/httpd.conf
2. Find the ServerName www.example.com:80 line, uncomment it, and change it to:
ServerName mm520zx.top:80
3. Find the DocumentRoot "/ var/www/html
line, and change it to the directory where your project entry file index.php is located, for example:
DocumentRoot "/var/www/html/yimeisheng2.com"
4. Find the following:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
Change
to
<IfModule dir_module>
DirectoryIndex index.php
</IfModule>
apache root directory configuration