【问题标题】:Virtualmin Apache multiple ip addresses in one virtual serverVirtualmin Apache 一台虚拟服务器中的多个 IP 地址
【发布时间】:2018-10-29 13:40:01
【问题描述】:

我的服务器是:

centos 7 中的 Webmin Virtualmin Apache VPS。

我在 webmin 中已经有 5 个不同的 ip 地址。

我已经在 Virtualmin 中创建了一个虚拟服务器。

我需要将所有 5 个 IP 地址连接到这个虚拟服务器。

虚拟服务器必须接受所有域:必须是所有 IP 地址的默认端点(域)。

我该怎么做。

【问题讨论】:

    标签: apache webmin virtualmin


    【解决方案1】:

    由于您希望所有地址都在同一个虚拟主机上,请执行以下操作:

    # Listen on all interfaces
    Listen 80
    
    # Default VH (first one in the configuration), for all connections on port 80
    <VirtualHost *:80>
        # Main domain
        ServerName www.example.com
        # Other domains, list all valid here
        ServerAlias example.com
    
        [... OTHER CONFIGURATION ...]
    
    </VirtualHost>
    

    如果请求的域与ServerNameServerAlias 中的任何一个匹配,它将使用该虚拟主机。如果请求的域与其他 VirtualHost 定义的 ANY 不匹配,如果它是配置中的第一个定义(即它是默认值),则仍将使用该域。

    【讨论】:

      猜你喜欢
      • 2011-08-17
      • 2017-05-15
      • 2015-03-27
      • 2012-11-06
      • 1970-01-01
      • 2018-05-04
      • 1970-01-01
      • 2016-05-29
      • 1970-01-01
      相关资源
      最近更新 更多