所以我有4个虚拟主机。我2天前制作了3个虚拟主机 一切正常。当我第二天创建另一个虚拟主机时,它 不会加载新创建的虚拟主机。所以我尝试重命名我的第一个Virtual的服务器名称 正在运行的主机。
我将www.test1.biboglobal.com的ServerName和Alias更改为hogehoge.com,但仍保留test1目录。保存文件并重新启动apache。但是当我试图浏览hogehoge.com时,它不会加载内容。
我尝试浏览test1.biboglobal.com但它仍然有用。但 服务器名称不再存在,因为我将其更改为 hogehoge.com。
我已经搜索了所有关于httpd.conf的内容,没有进行更改,但没有找到答案。我希望有一个人可以帮助我。
我还尝试删除所有虚拟主机并重新启动Apache。但仍然可以浏览test1,test2,test3.biboglobal.com。虽然它只显示了Apache测试页面,但没有显示其各自目录中的index.html。
NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80>
ServerAdmin webmaster@hogehoge.com //**This was supposed to be test1.biboglobal.com**
DocumentRoot /var/www/test2.biboglobal.com/public_html
ServerName www.hogehoge.com //**This was supposed to be test1.biboglobal.com**
ServerAlias hogehoge.com //**This was supposed to be test1.biboglobal.com**
ErrorLog /var/www/test1.biboglobal.com/error.log
# CustomLog /var/www/test1.biboglobal.com/requests.log
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@test2.biboglobal.com
DocumentRoot /var/www/test2.biboglobal.com/public_html
ServerName www.test2.biboglobal.com
ServerAlias test2.biboglobal.com
ErrorLog /var/www/test2.biboglobal.com/error.log
# CustomLog /var/www/test2.biboglobal.com/requests.log
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@test3.biboglobal.com
DocumentRoot /var/www/test3.biboglobal.com/public_html
ServerName www.test3.biboglobal.com
ServerAlias test3.biboglobal.com
ErrorLog /var/www/test3.biboglobal.com/error.log
# CustomLog /var/www/test3.biboglobal.com/requests.log
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@test4.biboglobal.com
DocumentRoot /var/www/test4.biboglobal.com/public_html
ServerName www.test4.biboglobal.com
ServerAlias test4.biboglobal.com
ErrorLog /var/www/test4.biboglobal.com/error.log
CustomLog /var/www/test4.biboglobal.com/requests.log common
</VirtualHost>