I need locally on windows 7 machine to start tomcat's example applications on port 80 like this: http://localhost:80/examples/
.
我需要在windows 7机器上本地启动tomcat在端口80上的示例应用程序:http://localhost:80/examples/。
I m following this great and simple tutorial and it works great when trying any of the tutorial's results:
我遵循这个伟大而简单的教程,它在尝试任何一个教程的结果时效果很好:
http://localhost:7000/examples/servlets ,Try Tomcat's servlet examples via Apache
http://localhost:7000/examples/jsp ,Try Tomcat's JSP examples via Apache
http://localhost:7000/examples ,Try Tomcat's examples via Apache
http://localhost:8181/ws ,Access ws from Tomcat directly (ws is a dummy custom app)
http://localhost:7000/ws ,Access ws via Apache
When I change the httpd.conf file from:
当我改变httpd时。配置文件:
Listen 127.0.0.1:7000 -----> 127.0.0.1:80
听127.0.0.1:7000 - - - - - - > 127.0.0.1:80
localhost:80 works --> apache main page
localhost/examples/ --->it just wont work!!(url not found)
For some reason when httpd is set to any other port that 80 it shall communicate with tomcat nicelly as the tutorial suggests, but when port is 80 it's like its refusing to contact with tomcat. Why is that ?
由于某些原因,当httpd被设置为任何其他端口80时,它应该像教程建议的那样与tomcat进行良好的通信,但是当端口80时,它就像拒绝与tomcat联系一样。这是为什么呢?
mod_jk.conf
mod_jk.conf
LoadModule jk_module modules/mod_jk.so
JkWorkersFile C:\apache-tomcat-7.0.8\conf\workers.properties
JkLogFile C:\apache-tomcat-7.0.8\logs\mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /ws ajp13
JkMount /ws/* ajp13
JkMount /examples ajp13
JkMount /examples/* ajp13
server.xml
server.xml
<Connector port="8181" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
httpd.conf
httpd . conf
Listen localhost:80
include C:\apache-tomcat-7.0.8\conf\mod_jk.conf
error.log
error.log
[Tue Aug 26 22:26:01.599679 2014] [ssl:warn] [pid 1780:tid 548] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Aug 26 22:26:04.984885 2014] [ssl:warn] [pid 1780:tid 548] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Aug 26 22:26:05.000485 2014] [mpm_winnt:notice] [pid 1780:tid 548] AH00455: Apache/2.4.10 (Win32) OpenSSL/1.0.1h mod_jk/1.2.40 configured -- resuming normal operations
[Tue Aug 26 22:26:05.016085 2014] [mpm_winnt:notice] [pid 1780:tid 548] AH00456: Apache Haus VC9 Server built: Jul 15 2014 20:34:18
[Tue Aug 26 22:26:05.016085 2014] [core:notice] [pid 1780:tid 548] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Tue Aug 26 22:26:06.061287 2014] [mpm_winnt:notice] [pid 1780:tid 548] AH00418: Parent: Created child process 3480
[Tue Aug 26 22:26:09.025292 2014] [ssl:warn] [pid 3480:tid 496] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Aug 26 22:26:09.540093 2014] [ssl:warn] [pid 3480:tid 496] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Tue Aug 26 22:26:10.413694 2014] [mpm_winnt:notice] [pid 3480:tid 496] AH00354: Child: Starting 64 worker threads.
access.log
access.log
::1 - - [26/Aug/2014:22:58:27 +0300] "GET /examples HTTP/1.1" 404 206
127.0.0.1 - - [26/Aug/2014:23:14:43 +0300] "GET /examples HTTP/1.1" 404 206
mod_jk.log
mod_jk.log
Tue Aug 26 22:26:01 2014][1780:1784] [warn] jk_map_validate_property::jk_map.c (419): The attribute 'worker.ajp13.cachesize' is deprecated - please check the documentation for the correct replacement.
[Tue Aug 26 22:26:01 2014][1780:1784] [warn] jk_map_validate_property::jk_map.c (419): The attribute 'worker.ajp13.cache_timeout' is deprecated - please check the documentation for the correct replacement.
[Tue Aug 26 22:26:03 2014][1780:1784] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized
[Tue Aug 26 22:26:04 2014][1780:1784] [warn] jk_map_validate_property::jk_map.c (419): The attribute 'worker.ajp13.cachesize' is deprecated - please check the documentation for the correct replacement.
[Tue Aug 26 22:26:04 2014][1780:1784] [warn] jk_map_validate_property::jk_map.c (419): The attribute 'worker.ajp13.cache_timeout' is deprecated - please check the documentation for the correct replacement.
[Tue Aug 26 22:26:05 2014][1780:1784] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized
[Tue Aug 26 22:26:09 2014][3480:3484] [warn] jk_map_validate_property::jk_map.c (419): The attribute 'worker.ajp13.cachesize' is deprecated - please check the documentation for the correct replacement.
[Tue Aug 26 22:26:09 2014][3480:3484] [warn] jk_map_validate_property::jk_map.c (419): The attribute 'worker.ajp13.cache_timeout' is deprecated - please check the documentation for the correct replacement.
[Tue Aug 26 22:26:09 2014][3480:3484] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized
[Tue Aug 26 22:26:09 2014][3480:3484] [warn] jk_map_validate_property::jk_map.c (419): The attribute 'worker.ajp13.cachesize' is deprecated - please check the documentation for the correct replacement.
[Tue Aug 26 22:26:09 2014][3480:3484] [warn] jk_map_validate_property::jk_map.c (419): The attribute 'worker.ajp13.cache_timeout' is deprecated - please check the documentation for the correct replacement.
[Tue Aug 26 22:26:09 2014][3480:3484] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized
catalina_t/t/t.log
catalina_t / t / t.log
Αυγ 26, 2014 10:35:44 ΜΜ org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_04\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jdk1.7.0_04\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jdk1.7.0_04\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jdk1.7.0_04\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Windows\System32;C:\ant\bin;C:\maven\apache-maven-3.0.4\bin;C:\Program Files (x86)\Windows Live\Shared;C:\ant\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PostgreSQL\9.2\bin;C:\Program Files\PostgreSQL\9.2\lib;;C:\ant\bin;C:\maven\apache-maven-3.0.4\bin;C:\Program Files (x86)\Windows Live\Shared;C:\ant\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PostgreSQL\9.2\bin;C:\Program Files\PostgreSQL\9.2\lib;;C:\ant\bin;C:\maven\apache-maven-3.0.4\bin;C:\Program Files (x86)\Windows Live\Shared;C:\ant\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PostgreSQL\9.2\bin;C:\Program Files\PostgreSQL\9.2\lib;C:\Users\Papatheodorou\RailsInstaller\Git\cmd;C:\Users\Papatheodorou\RailsInstaller\Ruby1.9.3\bin;c:\jruby-1.7.10\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jdk1.7.0_04\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jdk1.7.0_04\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Java\jdk1.7.0_04\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Windows\System32;C:\ant\bin;C:\maven\apache-maven-3.0.4\bin;C:\Program Files (x86)\Windows Live\Shared;C:\ant\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PostgreSQL\9.2\bin;C:\Program Files\PostgreSQL\9.2\lib;;C:\ant\bin;C:\maven\apache-maven-3.0.4\bin;C:\Program Files (x86)\Windows Live\Shared;C:\ant\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PostgreSQL\9.2\bin;C:\Program Files\PostgreSQL\9.2\lib;;C:\ant\bin;C:\maven\apache-maven-3.0.4\bin;C:\Program Files (x86)\Windows Live\Shared;C:\ant\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\PostgreSQL\9.2\bin;C:\Program Files\PostgreSQL\9.2\lib;;C:\ant\bin;C:\maven\apache-maven-3.0.4\bin;.
Αυγ 26, 2014 10:35:45 ΜΜ org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8181"]
Αυγ 26, 2014 10:35:45 ΜΜ org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Αυγ 26, 2014 10:35:45 ΜΜ org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2670 ms
Αυγ 26, 2014 10:35:46 ΜΜ org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Αυγ 26, 2014 10:35:46 ΜΜ org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.8
Αυγ 26, 2014 10:35:46 ΜΜ org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ch08download.xml from C:\apache-tomcat-7.0.8\conf\Catalina\localhost
Αυγ 26, 2014 10:35:46 ΜΜ org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Αυγ 26, 2014 10:35:47 ΜΜ org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Αυγ 26, 2014 10:35:47 ΜΜ org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory host-manager
Αυγ 26, 2014 10:35:47 ΜΜ org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Αυγ 26, 2014 10:35:47 ΜΜ org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Αυγ 26, 2014 10:35:48 ΜΜ org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory temp
Αυγ 26, 2014 10:35:48 ΜΜ org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8181"]
Αυγ 26, 2014 10:35:48 ΜΜ org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Αυγ 26, 2014 10:35:48 ΜΜ org.apache.catalina.startup.Catalina start
INFO: Server startup in 2265 ms
1 个解决方案
#1
0
The problem was with the apache distribution which I had downloaded from : http://www.apachehaus.com/cgi-bin/download.plx . The version was Apache 2.4.10 . I installed everything from the official site of appache and everything worked like a charm :)
问题在于我从http://www.apachehaus.com/cgi-bin/download.plx下载的apache发行版。版本是Apache 2.4.10。我安装了appache官方网站上的所有东西,所有的东西都像魔法一样:)
#1
0
The problem was with the apache distribution which I had downloaded from : http://www.apachehaus.com/cgi-bin/download.plx . The version was Apache 2.4.10 . I installed everything from the official site of appache and everything worked like a charm :)
问题在于我从http://www.apachehaus.com/cgi-bin/download.plx下载的apache发行版。版本是Apache 2.4.10。我安装了appache官方网站上的所有东西,所有的东西都像魔法一样:)