使用通配符将多个子域指向一个文件夹

发布于 2024-09-02 07:29:32 字数 120 浏览 5 评论 0原文

我想使用通配符将请求发送到任何 sobdomains 到域的文件夹。请指定如何使用虚拟主机设置在 apache2 中实现此目的。域及其子域使用相同的 IP 地址。子域无法预先确定,因为它们是由用户创建的。

谢谢

I want to use wildcards to send the request to any sobdomains to the folder of the domain.please specify how to achieve this in apache2 using the virtual host settings.The domain and its subdomain uses the same IP address. the subdomains cannot be predetermined as they are created by users.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

妞丶爷亲个 2024-09-09 07:29:32

这个配置怎么样

<VirtualHost *.domain.com:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/domain
    ServerName domain.com
    ServerAlias domain.com *.domain.com
</VirtualHost>

what about this configuration

<VirtualHost *.domain.com:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/domain
    ServerName domain.com
    ServerAlias domain.com *.domain.com
</VirtualHost>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文