我有一个带有网站的 Web 服务器,我想添加另一个地址以供预生产使用。
这里存在:
httpd.conf:
ServerAdmin support@toto.com
ServerName www.toto.com:80
DocumentRoot "/home/tutu/var/www/html"
模块/vhost.conf:
<VirtualHost *:80>
ServerAdmin support@toto.com
ServerName www.toto.com:80
DirectoryIndex index.php
ErrorLog /home/tutu/var/log/httpd/error-mod_log
LogLevel warn
CustomLog /home/tutu/var/log/httpd/access-mod_log common-cookie
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</VirtualHost>
我试图添加另一个 VirtualHost 但新地址不起作用:
<VirtualHost *:80>
ServerAdmin support@toto.com
ServerName www2.toto.com:80
DirectoryIndex index.php
ErrorLog /home/tutu/var/log/httpd/error-www2_log
LogLevel warn
CustomLog /home/tutu/var/log/httpd/access-www2_log common-cookie
DocumentRoot "/home/tutu/var/www2/html"
</VirtualHost>
地址 www2.toto.com 无效。你有想法吗?
谢谢