Apache/Resin 中的虚拟主机配置(运行 Adobe Coldfusion8)
我有在 Caucho Resin v3.1.9 之上运行 Adobe Coldfusion8(.war 安装)的开发服务器设置。 (CentOS 5.3-64bit)
注意:这是我第一次使用 Resin。 我正在尝试在 Resin 上运行 Coldfusion8,因为有人建议我这会给我带来巨大的性能提升。
我的问题是:如何像我现有的配置一样轻松集成多个 apache 虚拟主机。
在我的生产服务器上,运行 CF8,通过 apache 中的 mod_jrun22.so 在 Adobe 提供的 JRun 上独立安装,我为每个指向 '/var/www/*/html/ 的网站设置了虚拟主机,类似于以下内容(简化):
<VirtualHost 127.0.0.1:80>
DocumentRoot /var/www/www.mydomain.com/html
ServerName www.mydomain.com
ServerAlias mydomain.com
</VirtualHost>
<VirtualHost 127.0.0.1:80>
DocumentRoot /var/www/www.myotherdomain.com/html
ServerName www.myotherdomain.com
ServerAlias myotherdomain.com
</VirtualHost>
此配置允许我通过指向“/var/www/*/html”的 apache 设置虚拟主机,以便我可以使用 Coldfusion 应用程序快速部署网站。
对于 Resin,看来我还必须设置
我真正想要的是能够设置我的 apache 虚拟主机,然后让树脂进行相应的补偿。
我需要更好的解决方案,并且完全愿意接受任何建议。
I have development server setup running Adobe Coldfusion8 (.war install) on top of Caucho Resin v3.1.9. (CentOS 5.3-64bit)
note: This is my first experience with Resin. I am trying to run Coldfusion8 on top of Resin as I was suggested that this would give me great performance gains.
My question is: how I can easily integrate multiple apache virtualhosts like my existing configuration.
On my production server, running CF8, standalone install on Adobe supplied JRun via mod_jrun22.so in apache, I have virtual hosts setup for each of my websites pointing to '/var/www/*/html/, similar to the following (simplified):
<VirtualHost 127.0.0.1:80>
DocumentRoot /var/www/www.mydomain.com/html
ServerName www.mydomain.com
ServerAlias mydomain.com
</VirtualHost>
<VirtualHost 127.0.0.1:80>
DocumentRoot /var/www/www.myotherdomain.com/html
ServerName www.myotherdomain.com
ServerAlias myotherdomain.com
</VirtualHost>
This configuration allows me to setup virtual hosts through apache pointing to '/var/www/*/html' so I can quickly deploy websites with Coldfusion Apps.
Well with Resin, it appears I have to also setup <host> tags for each one of my virtual hosts in '/opt/resin/conf/resin.conf'. Thus, having to completely duplicate apache virtual hosts.
What I really want is to be able to setup my apache virtual hosts and then have resin compensate accordingly.
I need a better solution and am completely open to entertaining any suggestion.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 resin 文档 中,它显示了一个使用正则表达式进行更改的示例根目录。 您能否创建一个类似的正则表达式来捕获任何 .com 站点并设置文档根目录?
通过使用resin/railo和caucho,我根本找不到一种方法来仅在apache中进行虚拟主机配置。 无论如何,你必须将其复制到一定程度。 通过正则表达式条目或像我一样(只有大约 10 个域)为每个站点创建一个条目。
In the resin docs it shows an example using regex to change the root directory. Could you create a similar regex that just caught any .com site and set the document root?
From playing with resin/railo and caucho I couldn't find a way at all to just have the virtualhost configuration in apache only. You have to duplicate it to some level anyway. Either by a regex entry or as I did (only had about 10 domains) create a entry for each site.