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

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

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

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

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