Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
tw1992
V2EX  ›  Linux

请教大佬一个 apache 虚拟主机的问题

  •  
  •   tw1992 · Mar 21, 2019 · 2641 views
    This topic created in 2652 days ago, the information mentioned may be changed or developed.

    现用 apache 做的代理,配置了几个虚拟主机。现在有一个问题,只要域名解析到该服务器 IP,就能访问到默认的虚拟主机站点。怎么能域名必须绑定了虚拟主机才能访问?

    6 replies    2019-03-25 09:44:23 +08:00
    nfroot
        1
    nfroot  
       Mar 22, 2019 via Android
    那就把默认站点指向一个没有内容的文件夹里,然后用指令拦截默认站点所有请求就好了
    tw1992
        2
    tw1992  
    OP
       Mar 22, 2019
    @nfroot 这也是一种办法,但是强迫症想彻底一点。
    nfroot
        3
    nfroot  
       Mar 22, 2019
    @tw1992 那您改源码自己编译去吧。
    lopetver
        4
    lopetver  
       Mar 25, 2019
    tw1992
        6
    tw1992  
    OP
       Mar 25, 2019
    @lopetver 非常感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1336 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 17:10 · PVG 01:10 · LAX 10:10 · JFK 13:10
    ♥ Do have faith in what you're doing.