让lighttpd 加载虚拟主机?

发布于 2024-09-12 15:57:06 字数 267 浏览 1 评论 0原文

我的网站允许人们添加自己的虚拟主机条目,这些条目都指向同一目录,但 PHP 脚本的处理方式不同。这些域存储在 MySQL 表中,并在 lighttpd 启动时通过自动运行 lighttpd 配置文件中引用的 python 脚本来加载。

但显然,当有人添加新的虚拟主机时,只有在我手动重新启动lighttpd后它才起作用。有没有办法让lighttpd检查新的虚拟主机,或者实时读取它们?

我想过制作一个脚本来定期检查新的虚拟主机并在检测到更改时重新启动lighttpd,但这可能是一件坏事?

My site lets people add their own vhost entries that all point to the same directory, but are handled differently by a PHP script. The domains are stored in a MySQL table and are loaded when lighttpd starts, by automatically running a python script referenced in the lighttpd config file.

But obviously when someone adds a new vhost, it only works after I manually restart lighttpd. Is there a way to make lighttpd check for new vhosts, or read them live?

I thought of making a script that checks periodically for new vhosts and restarts lighttpd when a change is detected, but that's probably a bad thing to do?

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

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

发布评论

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

评论(1

我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文