cPanel 新手:如何覆盖虚拟主机设置?
我有一位客户希望能够通过 cPanel 添加/删除/修改电子邮件地址等,但我更愿意为实际站点添加我自己的虚拟主机配置,而不是 cPanel 生成的配置。 (有很多原因。不想安装 cPanel 的 ruby,宁愿使用乘客而不是杂种,等等)。
我对 cPanel 没有太多经验,但从外观来看,它接管了 httpd.conf 和 httpd.conf 。自动为站点生成虚拟主机 - 如果我尝试对虚拟主机设置进行任何更改,则会覆盖内容。是否有一种简单的方法可以覆盖这些设置,而不从 cPanel 中删除网站的其余功能?
干杯...
I have a client who wants to be able to add/delete/modify email addresses etc through cPanel, but I'd much rather add my own virtualhosts config for the actual site instead of a cPanel generated one. (A bunch of reasons. Don't want to install cPanel's ruby, would rather use passenger than mongrel, etc etc).
I don't have a whole lot of experience with cPanel, but by the look of things it takes over httpd.conf & auto-generates a virtualhost for the site - and overwrites stuff if I try to make any changes to the virtualhost settings. Is there a simple means to overwrite these settings without removing the rest of the site's functionality from cPanel?
Cheers...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的猜测是正确的,cPanel 接管了很多事情并自动生成某些配置。老实说,我不知道它在虚拟主机配置方面有什么作用,但我确实有最近在其他领域的经验,这往往证实了您的怀疑:
所以,为了说明...... cPanel 有库存与 Rails 2.3.5 一起使用。在 cPanel GemSet 页面上,您可以看到 Rails 3.0.6 显示为可用,甚至允许您通过 cPanel 或 SSH/BASH 安装它。这不会导致任何错误消息(事实上,cPanel 本身将其报告为已安装),但 SSH/BASH 上的
rails --version
命令仍然显示版本 2.3.5。 经过一些研究在cPanel论坛中,我发现这是因为cPanel是为Mongrel支持而硬编码的,而Mongrel不支持Rails 2.3.8以上的版本。据他们的一位主持人称,他们正在寻找一种可能的 Passenger 解决方案,但仍处于编码的早期阶段,还需要几个月的时间。因此,虽然我意识到我的示例并没有具体回答您有关虚拟主机的问题,但我认为它证实了您的怀疑的正确性,即 cPanel 会覆盖某些设置,甚至可能以不立即透明的方式进行硬编码......
You are correct in guessing that cPanel takes over a lot of things and auto-generates certain configs. To be honest, I have no idea what it does in regard to virtualhosts configs, but I do have recent experience in other areas which tends to confirm your suspicion:
So, to illustrate... cPanel comes stock with Rails 2.3.5. On the cPanel GemSet page, you can see Rails 3.0.6 shows as available, and even lets you install it via cPanel or SSH/BASH. This results in no error message at all (in fact, cPanel itself reports it as installed), but a
rails --version
command at SSH/BASH still shows version 2.3.5. After some research on on the cPanel forums, I discovered that this is because cPanel is hard coded for Mongrel support, and Mongrel doesn't support Rails past version 2.3.8. According to one of their moderators, they're looking at a possible Passenger solution, but it's still in the early stages of coding and months away.So, while I realize my example doesn't specifically answer your question about virtualhosts, I think it confirms the validity of your suspicion that cPanel overrides certain settings, and may even be hard coded in ways that aren't immediately transparent...