【发布时间】:2023-04-06 06:40:01
【问题描述】:
我正在尝试创建一个新的虚拟主机,其中任何子域都将指向文档根目录。
它需要是一个通配符,因为新的子域将被添加到程序中。
到目前为止,我的 vhost 配置中的内容(相关部分):
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/test"
ServerName test.dev
ServerAlias *.test.dev
</VirtualHost>
Windows 主机:
127.0.0.1 *.test.dev
我只能访问 test.dev,但不能访问它的子域。
【问题讨论】:
-
使用亚克力解决了这个问题,所以我会发布该链接作为答案。
标签: windows apache xampp vhosts