实现访问www.aaa.com跳转到www.test.com上去
1.配置虚拟主机配置文件:
[root@localhost ~]# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
2.[root@localhost ~]# apachectl -t
httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
Syntax OK
3.[root@localhost ~]# apachectl restart
httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
httpd not running, trying to start
(98)Address already in use: make_sock: unable to listen for connections on address [::]:80
(98)Address already in use: make_sock: unable to listen for connections on address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
4.由于apache无法重启,所以重启虚拟机
5.输入www.aaa.com还是没有跳转到www.test.com上去
编辑回复