Issue
I need locally on windows 7 machine to start tomcat's example applications on port 80 like this: http://localhost:80/examples/
.
I m following this great and simple href="http://www.ntu.edu.sg/home/ehchua/programming/howto/ApachePlusTomcat_HowTo.html" rel="nofollow noreferrer">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:
Listen 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 ?
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
<Connector port="8181" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
httpd.conf
Listen localhost:80
include C:\apache-tomcat-7.0.8\conf\mod_jk.conf
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
::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
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
Αυγ 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
Solution
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 :)
Answered By - George Papatheodorou Answer Checked By - Timothy Miller (WPSolving Admin)