我应该在哪里实现“默认重定向”在阿帕奇中
目前我有 3 个独立的虚拟主机文件(default、staging 和 devel)。我希望 www.example.com 和 example.com 使用默认虚拟主机。我希望 staging.example.com 使用 staging vhost。这就是我遇到的问题所在;我想要别的东西,例如。 everything.example.com 或 else.example.com 使用开发虚拟主机。实现这一目标的最佳方法是什么?
Currently i have 3 separate vhost files default,staging,and devel. I want www.example.com and example.com to use the default vhost. I want staging.example.com to use the staging vhost. Heres where the problem im having is; i want anything else ex. anything.example.com or else.example.com to use the devel vhost. what is the best way to accomplish this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Apache 读取的第一个主机将是默认主机。
因此,我建议在
httpd.conf
上插入默认文件,因为首先读取该文件,然后根据需要加载所有VHosts
。The first host Apache reads will be the default one.
I would therefore recommend inserting the default one on
httpd.conf
as this file is read first and then load up allVHosts
as you wish.