【发布时间】:2014-11-01 06:32:21
【问题描述】:
我的虚拟主机名有问题。我正在基于 CentOS 的操作系统中设置一个虚拟主机。在主机文件中,我添加了 2 个虚拟主机 URL。我还编辑了 httpd.conf 文件。我添加了虚拟主机目录。我重新启动了 httpd 并在浏览器中打开了 URL。但它不会进入我的页面。它重定向到其他页面。询问主机名。这是我的设置。
在我的 httpd.conf 我有这个:
<VirtualHost *:80>
DocumentRoot /data/APACHE/html/metro
ServerName store6.giftregistry.com.ph
ServerAlias store6.giftregistry.com.ph
<Directory "/data/APACHE/html/metro">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /data/APACHE/html/metro
ServerName store7.giftregistry.com.ph
ServerAlias store7.giftregistry.com.ph
<Directory "/data/APACHE/html/metro">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
在主机文件中我有这个:
10.128.0.63 store6.giftregistry.com.ph
10.128.0.63 store7.giftregistry.com.ph
我的代码有错误吗?
【问题讨论】: