Re: Apache/Tomcat integration - Update

2005-08-16 Thread Kyle

Ok,

One step at a time. Thanks so far Darryl.

I now have it working across the internal network, but not externally. 
The next step is what do I now need to do so that I can see the 
jsp/servlets-examples pages externally??


Also, as I understand it, this format means that TC 5.5.9 will be the 
only one available to ALL VHosts. I need to set up different Tomcat 
versions with the different VHosts. Another day's question for now.



{For reference, I have included the changes made to my originally mailed 
config at the bottom.}



As follow up to earlier questions;

You need to confirm that requests for the vhost are being correctly 
routed into the VirtualHost section of the apache config.  If they are 
not then there is no sense looking at the JkMount configuration yet.  ...


logging is set up differently for the global config and the default 
VHost. It is the VHost error log which is displaying the File does not 
exist errors. This file registered these internally initially and it is 
now still this file which is registering the same error for external calls.


So if you want to a single hostname in the URL then you need to 
configure both Apache (ServerName/ServerAlias) and Tomcat (Host / 
Alias) to responsd to the same hostname.



it is precisely this combo which didn't work.
Engine defaultHost=same_as_Apache_ServerName__Default_VHost
Host name=same_as_Apache_ServerName__Default_VHost
Aliaslocalhost/Alias

I have now switched them (see below) and it appears to work.



I suspect your only remaining problem now is to get Apache and Tomcat 
to see the same website document roots for the same URLs.  This maybe 
a problem if you are using deployed WARs since tomcat can and will 
delete the directory from under apache during the deployment process.


How do you mean TC can and will delete the directory from under 
Apache? Which directory do you mean? At this point, I am only trying to 
view the WARs bundled with TC. I am starting TC before Apache with the 
apps already deployed (so far).


Thanks again.

Kyle

==

httpd.conf now looks like;
--

ServerName host.domain.com:80
.

VirtualHost *:80
ServerAdmin [EMAIL PROTECTED]
ServerName host.domain.com
ErrorLog logs/host-defaulthost-error_log
CustomLog logs/host-defaulthost-access_log common
/VirtualHost

Include /opt/jakarta-tomcat-5.5.9/conf/auto/mod_jk.conf
JkLogStampFormat [%a %d %b %Y %H:%M:%S] 
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkRequestLogFormat %w %V %T

server.xml has been switched (localhost now defaultHost - surely this 
can't be right)

--

Engine name=Catalina defaultHost=localhost

Host name=localhost appBase=webapps  unpackWARs=true 
autoDeploy=true

   xmlValidation=false xmlNamespaceAware=false

Aliashost.domain.com/Alias

and mod_jk.conf is almost the std. auto-generated file from TC with the 
minor additions of;



Directory /opt/jakarta-tomcat-5.5.9/webapps/jsp-examples
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
ADDED IN
Order allow,deny
Allow from all
/ADDED IN
/Directory
And
JkMount /jsp-examples/* ajp13Wkr



Also del'd the JNI worker in workers.properties as suggested.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache/Tomcat integration - Update

2005-08-16 Thread Darryl L. Miles


Do you have a line in Apache:

NameVirtualHost *:80

I dont think ServerName should have the port number after it.  This and 
ServerAlias are Host: header matching values.




I suspect your only remaining problem now is to get Apache and 
Tomcat to see the same website document roots for the same URLs.  
This maybe a problem if you are using deployed WARs since tomcat 
can and will delete the directory from under apache during the 
deployment process.


How do you mean TC can and will delete the directory from under 
Apache? Which directory do you mean? At this point, I am only trying 
to view the WARs bundled with TC. I am starting TC before Apache with 
the apps already deployed (so far).


I suggest you learn more about the exact nature of the deployment 
procedure from an packed WAR to an unpacked WAR that goes in within TC.



--
Darryl L. Miles



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache/Tomcat integration - Update

2005-08-16 Thread Kyle



Darryl L. Miles wrote:


Do you have a line in Apache:

NameVirtualHost *:80

I dont think ServerName should have the port number after it.  This and 
ServerAlias are Host: header matching values.




Darryl,

yes I do.

However the ServerName directive I have been referring to in all msgs is 
the global ServerName directive that comes in much further up the file 
(example file anyway). The actual Hostname of the machine. It is this 
name I have been putting into the VirtualHost tag as the default VHost.


I.e. It is this name I want the machine to respond with rather than 
www as a default.


I'm beginning to wonder whether this is the right thing to be doing.

--
Kind Regards

Kyle


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]