ECS,CENTOS7.4,Apache 子域名设置不成功-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

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

上海wm 2018-04-26 11:22:29 1084

环境: 云服务器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

域名解析 弹性计算 关系型数据库 MySQL Apache PHP
分享到
取消 提交回答
全部回答(3)
添加回答
+ 订阅

时时分享云计算技术内容,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。

推荐文章
相似问题
推荐课程