ECS,CENTOS7.4,Apache 子域名设置不成功

环境: 云服务器ECS,CENTOS7.4,Apache,PHP,MySQL 按网上一般的说明:
1. 设置域名解析 设置了crm.MyDomain.com, shop.MyDomain.com
2. httpd.conf里设置了: Include conf/extra/httpd-vhosts.conf
3. httpd-vhosts.conf里设置了: (只有www.MyDomain.com起作用)
<VirtualHost MyIP:80>
ServerName www.MyDomain.com
ServerAlias MyDomain.com
DocumentRoot /data/www/default
<Directory /data/www/default>
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Order Deny,Allow
Require all granted
DirectoryIndex index.php index.html index.htm
</Directory>
</VirtualHost>

<VirtualHost MyIP:80>
ServerName crm.MyDomain.com
ServerAlias crm.MyDomain.com
ServerAdmin admin@MyDomain.com
DocumentRoot /data/www/default/crm
ErrorLog /usr/local/apache/logs/crm/error_log
TransferLog /usr/local/apache/logs/crm/access_log
</VirtualHost>

<VirtualHost MyIP:80>
ServerName shop.MyDomain.com
ServerAlias shop.MyDomain.com
ServerAdmin shopAdmin@MyDomain.com
DocumentRoot /data/www/default/shop
ErrorLog /usr/local/apache/logs/shop/error_log
TransferLog /usr/local/apache/logs/shop/access_log
</VirtualHost>

crm.MyDomain.com, shop.MyDomain.com 出错信息:
sundomain

当前问题共有如下(3)个解决方案
上一篇:备案前。Ecs和域名可以正常使用吗?
下一篇:服务器ECS系统升级重启了,是不是PHPstudy需要重新配置域