有人设置 tomcat 使用 mod_jk 运行虚拟主机吗
我在 OSX 上工作,主要使用 PHP。通常我在本地使用 MAMP 和 httpd.conf 中的虚拟主机设置进行工作,以便我可以将浏览器指向 http://some-project 并拥有我需要设置的尽可能多的项目。
我们有一个项目需要提供 JSP 页面,我想设置我的本地 apache 服务器仅向 Tomcat 提供 JSP 文件,而使用相同的虚拟主机设置将其他所有内容提供给 MAMP:
~/applications/MAMP/ conf/apache/httpd.conf
到目前为止我已经:
成功安装 Tomcat
将 mod_jd.so 放入
~/applications/MAMP/Library/modules/mod_jk.so
通过放置添加模块:
LoadModule jk_module module/mod_jk.so
~/applications/MAMP/conf/apache/httpd.conf
- Created /Library/Tomcat/Home/conf/jk/workers.properties 并添加以下行:
workers.tomcat_home=/库/Tomcat workers.java_home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
ps=/ Worker.list=ajp12, ajp13
worker.ajp13.port=8009 工人.ajp13.host=本地主机 工人.ajp12.type=ajp13 worker.ajp13.mount=/*.jsp
添加了以下行:
JkWorkersFile /Library/Tomcat/Home/conf/workers.properties JkLogFile /Library/Tomcat/Home/logs/mod_jk.log JkLogLevel debug
到 ~/applications/MAMP/conf/apache/httpd.conf
但是,当我的 httpd.conf 中出现最后两行时,我无法启动 MAMP。
有人这样工作吗?
有什么建议吗?
对我做错了什么有明确的想法吗?
I work in OSX primarily with mostly PHP. Normally I work locally using MAMP and virtual hosts setup in my httpd.conf so that I can point a browser to http://some-project and have as many projects as I need setup.
We have a project coming up where we need to serve JSP pages and I would like to set up my local apache server to serve only JSP files to Tomcat and everything else to MAMP using the same virtual hosts setup in:
~/applications/MAMP/conf/apache/httpd.conf
So far I have:
Successfully installed Tomcat
Placed mod_jd.so in
~/applications/MAMP/Library/modules/mod_jk.so
Added the module by placing:
LoadModule jk_module modules/mod_jk.so
in
~/applications/MAMP/conf/apache/httpd.conf
Created /Library/Tomcat/Home/conf/jk/workers.properties
and added the following lines:workers.tomcat_home=/Library/Tomcat
workers.java_home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Homeps=/
worker.list=ajp12, ajp13worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp12.type=ajp13
worker.ajp13.mount=/*.jspadded the following lines:
JkWorkersFile /Library/Tomcat/Home/conf/workers.properties
JkLogFile /Library/Tomcat/Home/logs/mod_jk.log JkLogLevel debug
to
~/applications/MAMP/conf/apache/httpd.conf
I cannot start my MAMP however when these last two lines are present in my httpd.conf.
Does anyone work like this?
Any tips?
Any clear ideas of what I'm doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现 MAMP 除非日志文件已经存在,否则它不会启动。我创建日志文件的路径,并放入一个与预期日志文件名称相同的空文本文档,它会立即启动。
I've found with MAMP that it won't start unless the log files already exist. I create the path to the log file and put in an empty text document named the same as the expected log file and it starts right up.