我想用Apache HTTP服务器configurationtomcat 7,但它不工作。
Tomcat正确运行在http://127.0.0.1:8085
I have installed `mod_jk`: aptitude install libapache2-mod-jk
我的workers.properties文件:
worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009
/etc/apache2/mods-available/jk.conf jk.conf文件:
JkWorkersFile /etc/apache2/workers.properties JkShmFile /var/log/apache2/mod_jk.shm JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info
要启用kj,输出a2enmod jk :
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US.UTF-8", LC_ALL = "en_US.UTF-8", LC_PAPER = "en_US.UTF-8", LC_ADDRESS = "en_US.UTF-8", LC_MONETARY = "en_US.UTF-8", LC_NUMERIC = "en_US.UTF-8", LC_TELEPHONE = "en_US.UTF-8", LC_IDENTIFICATION = "en_US.UTF-8", LC_MEASUREMENT = "en_US.UTF-8", LC_TIME = "en_US.UTF-8", LC_NAME = "en_US.UTF-8", LANG = "fr_FR.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("fr_FR.UTF-8"). Module jk already enabled
然后apache2 / site-available / 000-default.conf包含一行:
<VirtualHost *:80> .. JkMount /tomcat7/* worker1 </VirtualHost>
以下在tomcat7 / server.xml中已被取消注释:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
毕竟,tomcat7和apache2都重新启动
http://host.com/tomcat7给404,我期待Tomcat7页
我用apache web服务器configurationtomcat7时出错?
有时候设置ajp13_worker是非常棘手的。 但是你的configuration看起来是对的。
那么你是否已经尝试打开http://host.com/tomcat7/ index.jsf (或jsp或your_file_name)? 你在webapp的web.xml中设置了一个欢迎文件吗? 否则它不起作用。
./WebContent/WEB-INF/web.xml:
<web-app (…) > (...) <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> (…) </web-app>