在同一个IP的不同端口上配置两个网站时出错?

时间:2016-01-18 11:42:50

标签: apache httpd.conf

我尝试在apache配置文件中配置虚拟主机。我的要求是托管两个站点在同一个ip但不同的端口。

Listen 192.168.2.10:80
Listen 192.168.2.10:9021

NameVirtualHost 192.168.2.10:80
NameVirtualHost 192.168.2.10:9021

<VirtualHost 192.168.2.10:80>
   DocumentRoot /var/www/html/white-socks
   ServerName www.white-socks.com
</VirtualHost>

<VirtualHost 192.168.2.10:9021>
    DocumentRoot /var/www/html/black-socks
    ServerName www.black-socks.com
</VirtualHost>

这是我在“httpd.conf”中的配置。 但我得到的错误如下

[root@ram conf]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for ram
httpd: Could not reliably determine the server's fully qualified domain    name, using 127.0.0.1 for ServerName
(13)Permission denied: make_sock: could not bind to address  192.168.2.10:9021
no listening sockets available, shutting down
Unable to open logs
                                                       [FAILED]
[root@ram conf]# 

我的错误是什么以及我必须做些什么才能解决这个问题?

0 个答案:

没有答案