You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Madhava Reddy <Ma...@icon-scm.com> on 2003/01/23 19:21:37 UTC
aliasing local host
Hi..
I wanted to alias my localhost to some name. But I am not able to understand
what else is needed..I changed Host name. I have only one web application
in webapps namely test. Here is server.xml, catalina_log and localhost log
files.
I am just playing to get it working.. but no success yet. Please help me.
this is the url I tried http://testme/test/index.html
Thanks
Madhav
server.xml
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
<GlobalNamingResources>
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
<Service name="Tomcat-Standalone">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="80" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false" />
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8010" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
<Engine name="Standalone" defaultHost="localhost" debug="10">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>
<Host name="testme" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<Context name="/test" docBase="test" debug="1"/>
</Host>
</Engine>
</Service>
</Server>
localhost log
2003-01-23 19:13:56 StandardHost[testme]: Removing web application at
context path /test
2003-01-23 19:13:56 StandardContext[/test]: Stopping
2003-01-23 19:13:56 StandardContext[/test]: Stopping filters
2003-01-23 19:13:56 StandardContext[/test]: Processing standard container
shutdown
2003-01-23 19:13:56 ContextConfig[/test]: ContextConfig: Processing STOP
2003-01-23 19:13:56 StandardContext[/test]: Sending application stop events
2003-01-23 19:13:56 StandardContext[/test]: Releasing document base test
2003-01-23 19:13:56 StandardContext[/test]: Stopping complete
2003-01-23 19:14:04 StandardContext[/test]: Starting
2003-01-23 19:14:04 StandardContext[/test]: Processing start(), current
available=false
2003-01-23 19:14:04 StandardContext[/test]: Configuring default Resources
2003-01-23 19:14:04 StandardContext[/test]: Configuring non-privileged
default Loader
2003-01-23 19:14:04 StandardContext[/test]: Configuring default Manager
2003-01-23 19:14:04 StandardContext[/test]: Processing standard container
startup
2003-01-23 19:14:05 WebappLoader[/test]: Deploying class repositories to
work directory D:\tomcat4110\work\Standalone\testme\test
2003-01-23 19:14:05 WebappLoader[/test]: Deploy class files /WEB-INF/classes
to D:\tomcat4110\webapps\test\WEB-INF\classes
2003-01-23 19:14:05 ContextConfig[/test]: ContextConfig: Processing START
2003-01-23 19:14:05 StandardContext[/test]: Setting deployment descriptor
public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
2003-01-23 19:14:05 StandardContext[/test]: Setting deployment descriptor
public ID to '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
2003-01-23 19:14:05 ContextConfig[/test]: Accumulating TLD resource paths
2003-01-23 19:14:05 ContextConfig[/test]: Pipline Configuration:
2003-01-23 19:14:05 ContextConfig[/test]:
org.apache.catalina.core.StandardContextValve/1.0
2003-01-23 19:14:05 ContextConfig[/test]: ======================
2003-01-23 19:14:05 NamingContextListener[/Standalone/testme/test]: Creating
JNDI naming context
2003-01-23 19:14:05 StandardManager[/test]: Seeding random number generator
class java.security.SecureRandom
2003-01-23 19:14:05 StandardManager[/test]: Seeding of random number
generator has been completed
2003-01-23 19:14:05 StandardContext[/test]: Posting standard context
attributes
2003-01-23 19:14:05 StandardContext[/test]: Configuring application event
listeners
2003-01-23 19:14:05 StandardContext[/test]: Sending application start events
2003-01-23 19:14:05 StandardContext[/test]: Starting filters
2003-01-23 19:14:05 StandardWrapper[/test:default]: Loading container
servlet default
2003-01-23 19:14:05 StandardWrapper[/test:invoker]: Loading container
servlet invoker
2003-01-23 19:14:06 StandardContext[/test]: Starting completed
catalina log
2003-01-23 19:13:56 EngineConfig: EngineConfig: Processing STOP
2003-01-23 19:14:06 EngineConfig: EngineConfig: Processing START
and tomcat console output
0 [main] INFO modeler.Registry - Loading registry information
10 [main] INFO modeler.Registry - Creating new Registry instance
781 [main] INFO modeler.Registry - Creating MBeanServer
2093 [main] INFO http11.Http11Protocol - Initializing Coyote HTTP/1.1 on
port 80
Starting service Tomcat-Standalone
Apache Tomcat/4.1.10
3936 [main] INFO http11.Http11Protocol - Starting Coyote HTTP/1.1 on port
80
3966 [main] INFO common.ChannelSocket - JK2: ajp13 listening on tcp port
8009
3996 [main] INFO server.JkMain - Jk running ID=0 time=0/40
config=D:\tomcat4110\conf\jk2.properties
Re: Apache to JKMount everything
Posted by Pascal Forget <to...@ubeans.com>.
Lajos wrote:
> You can do:
>
> JkMount /* ajp13
> JkMount /*.jsp ajp13
>
> where "ajp13" refers to the worker name in workers.properties. But if
> you are doing that, why use Apache?
Because Apache may startup as root (because of port 80 or 443) while
tomcat runs as nobody
Pascal
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Apache to JKMount everything
Posted by Lajos <lm...@galatea.com>.
You can do:
JkMount /* ajp13
JkMount /*.jsp ajp13
where "ajp13" refers to the worker name in workers.properties. But if
you are doing that, why use Apache?
Regards,
Lajos
Richie Chauhan wrote:
> I'm fairly new to all of this but try
>
> 1) JkMount /*.jsp local_ajp13
> 2) DirectoryIndex index.jsp
>
> I think this means anything that matches the url *.jsp under the / context
> is to be handled by jsp.
>
> The DirectoryIndex part of it just lets apache know which pages to fetch
> when it encounters www.adsf.com/
>
> Richie
>
>
> -----Original Message-----
> From: Pascal Forget [mailto:tomcatdev@ubeans.com]
> Sent: Friday, January 24, 2003 12:41 PM
> To: Tomcat Users List
> Subject: Apache to JKMount everything
>
>
> Hi,
>
> I would like Apache to redirect _everything_ to tomcat. But it
> has to be done through mod_jk.
>
> I tried JkMount * tomcat but it doesn't work. I did
> put things such as JkMount *.jsp tomcat and that works,
> but my main problem is that even though I have put
> DirectoryIndex index.jsp in httpd.conf, http://www.foobar.com/index.jsp
> works but http://www.foobar.com/ gives me a directory listing.
>
> Please help,
>
> Pascal Forget
> tomcatdev@ubeans.com
> pascal.forget@videotron.ca
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
Lajos Moczar
----------------------------------------
Open Source Support, Consulting and Training
----------------------------------------
Cocoon Developer's Handbook
(www.amazon.com/exec/obidos/tg/detail/-/0672322579)
_ _____
/ \ /
/___\ /
/ \ /____
http://www.galatea.com -- powered by AzSSL
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Apache to JKMount everything
Posted by Richie Chauhan <ri...@ajava.biz>.
I'm fairly new to all of this but try
1) JkMount /*.jsp local_ajp13
2) DirectoryIndex index.jsp
I think this means anything that matches the url *.jsp under the / context
is to be handled by jsp.
The DirectoryIndex part of it just lets apache know which pages to fetch
when it encounters www.adsf.com/
Richie
-----Original Message-----
From: Pascal Forget [mailto:tomcatdev@ubeans.com]
Sent: Friday, January 24, 2003 12:41 PM
To: Tomcat Users List
Subject: Apache to JKMount everything
Hi,
I would like Apache to redirect _everything_ to tomcat. But it
has to be done through mod_jk.
I tried JkMount * tomcat but it doesn't work. I did
put things such as JkMount *.jsp tomcat and that works,
but my main problem is that even though I have put
DirectoryIndex index.jsp in httpd.conf, http://www.foobar.com/index.jsp
works but http://www.foobar.com/ gives me a directory listing.
Please help,
Pascal Forget
tomcatdev@ubeans.com
pascal.forget@videotron.ca
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Apache to JKMount everything
Posted by Pascal Forget <to...@ubeans.com>.
Hi,
I would like Apache to redirect _everything_ to tomcat. But it
has to be done through mod_jk.
I tried JkMount * tomcat but it doesn't work. I did
put things such as JkMount *.jsp tomcat and that works,
but my main problem is that even though I have put
DirectoryIndex index.jsp in httpd.conf, http://www.foobar.com/index.jsp
works but http://www.foobar.com/ gives me a directory listing.
Please help,
Pascal Forget
tomcatdev@ubeans.com
pascal.forget@videotron.ca
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Apache + Tomcat + Virtual Host
Posted by Sebastião Carlos Santos <sc...@bol.com.br>.
I will redo the configuration of the Apache with the tomcat, this time not using mod_jk.conf generated automatically.
I thank for the the help and released attention
*********** REPLY SEPARATOR ***********
On 23/01/2003 at 13:22 Lajos Moczar wrote:
>E-mail Premium BOL
>Antivírus, anti-spam e até 100 MB de espaço. Assine já!
>http://email.bol.com.br/
>Yup, you can do that, and then manually put the JkMount commands where
>you need them. However, I always find it more intuitive and readable to
>have all commands directly in httpd.conf. Personally, I hate the
>auto-generated mod_jk.conf because almost all Tomcat installations I
>have done required some sort of manual adjustment - like the mod_jk.dll
>path problem mentioned earlier today, or virtual host issues.
>
>Regards,
>
>Lajos
>
>
>Sebastião Carlos Santos wrote:
>> Without problem. Everything is well.
>> In case I have configured Tomcat to generate mod_jk.conf automatically
>the configuration will change? Best saying, I just used Include /
>path/to/mod_jk.conf in httpd.conf instead of LoadModule, AddModule and
>JkWorkersFile.
>>
>>
>> Sebastião Carlos Santos
>> Oracle Database Administrator
>> Universidade Federal de Uberlândia - UFU
>> Gratificação de Estímulo à Docência - GED
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>> For additional commands, e-mail:
><ma...@jakarta.apache.org>
>>
>>
>
>
>--
>
>
>
> Lajos Moczar
> ----------------------------------------
> Open Source Support, Consulting and Training
> ----------------------------------------
> Cocoon Developer's Handbook
> (www.amazon.com/exec/obidos/tg/detail/-/0672322579)
>
> _ _____
> / \ /
> /___\ /
> / \ /____
>
> http://www.galatea.com -- powered by AzSSL
>
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
Sebastião Carlos Santos
Oracle Database Administrator
Universidade Federal de Uberlândia - UFU
Gratificação de Estímulo à Docência - GED
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Apache + Tomcat + Virtual Host
Posted by Lajos Moczar <lm...@galatea.com>.
Yup, you can do that, and then manually put the JkMount commands where
you need them. However, I always find it more intuitive and readable to
have all commands directly in httpd.conf. Personally, I hate the
auto-generated mod_jk.conf because almost all Tomcat installations I
have done required some sort of manual adjustment - like the mod_jk.dll
path problem mentioned earlier today, or virtual host issues.
Regards,
Lajos
Sebastião Carlos Santos wrote:
> Without problem. Everything is well.
> In case I have configured Tomcat to generate mod_jk.conf automatically the configuration will change? Best saying, I just used Include / path/to/mod_jk.conf in httpd.conf instead of LoadModule, AddModule and JkWorkersFile.
>
>
> Sebastião Carlos Santos
> Oracle Database Administrator
> Universidade Federal de Uberlândia - UFU
> Gratificação de Estímulo à Docência - GED
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
Lajos Moczar
----------------------------------------
Open Source Support, Consulting and Training
----------------------------------------
Cocoon Developer's Handbook
(www.amazon.com/exec/obidos/tg/detail/-/0672322579)
_ _____
/ \ /
/___\ /
/ \ /____
http://www.galatea.com -- powered by AzSSL
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Apache + Tomcat + Virtual Host
Posted by Sebastião Carlos Santos <sc...@bol.com.br>.
Without problem. Everything is well.
In case I have configured Tomcat to generate mod_jk.conf automatically the configuration will change? Best saying, I just used Include / path/to/mod_jk.conf in httpd.conf instead of LoadModule, AddModule and JkWorkersFile.
Sebastião Carlos Santos
Oracle Database Administrator
Universidade Federal de Uberlândia - UFU
Gratificação de Estímulo à Docência - GED
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Apache + Tomcat + Virtual Host
Posted by Lajos Moczar <lm...@galatea.com>.
Sebastiao -
Sorry I didn't get back to you ealier in the week on this.
What you need to do is add a JkMount directive inside your virtual host:
JkMount /admged ajp13
JkMount /admged/* ajp13
This is assuming that you put the LoadModule, AddModule, JkWorkersFile
earlier in httpd.conf.
In server.xml, change your <Host> name attribute to the server name you
are working with: "admged.ufu.br". Then, make sure you have a <Context>
configured to handle the "/admged" URI coming from Apache. I would suggest:
<Host name="admged.ufu.br" docBase="/web" ... >
<Context path="/admged" docBase="admged" debug="0"/>
<!-- other contexts -->
</Host>
Regards,
Lajos
Sebasti?o Carlos Santos wrote:
> I have a server with Apache 2.0.44 and Tomcat 4.1.18
> working jointly, through mod_jk.so, accordingly
> documented in John Turner HowTo ("Apache 2.0.43 + Tomcat 4.1.12 + mod_jk").
> All accomplished the tests after the installation and when typing the
> url http://admged.ufu.br/examples verified that the configuration
> it was correct, because the Apache is working correctly and
> JSP and servlets requests are being passed to tomcat.
> However, I am not getting to close the configuration of the
> virtual host for you ally him www.admged.ufu.br in what is said
> I respect Tomcat.
> The virtual host in the Apache is configured as having shown
> below:
>
> NameVirtualHost 200.131.195.9
>
> <VirtualHost 200.131.195.9>
> DocumentRoot /web/admged
> ServerName www.admged.ufu.br
> </VirtualHost>
>
> My directory tree is the following:
>
> /web/
> |-- admged
> |-- WEB-INF
> | `-- classes
> `-- logs
>
> Where:
>
> /web -> point of assembly of my directory tree
> admged -> folder where I will put the files. jsp
> WEB-INF
> classes -> folder where I will put the classes java
>
>
> I would like to know how the structure of JkMount would be for the
> Virtual Host in the Apache and also the configuration of the contexts
> in server.xml
> Sebastião Carlos Santos
> Oracle Database Administrator
> Universidade Federal de Uberlândia - UFU
> Gratificação de Estímulo à Docência - GED
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
Lajos Moczar
----------------------------------------
Open Source Support, Consulting and Training
----------------------------------------
Cocoon Developer's Handbook
(www.amazon.com/exec/obidos/tg/detail/-/0672322579)
_ _____
/ \ /
/___\ /
/ \ /____
http://www.galatea.com -- powered by AzSSL
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Apache + Tomcat + Virtual Host
Posted by Sebastio Carlos Santos <sc...@bol.com.br>.
I have a server with Apache 2.0.44 and Tomcat 4.1.18
working jointly, through mod_jk.so, accordingly
documented in John Turner HowTo ("Apache 2.0.43 + Tomcat 4.1.12 + mod_jk").
All accomplished the tests after the installation and when typing the
url http://admged.ufu.br/examples verified that the configuration
it was correct, because the Apache is working correctly and
JSP and servlets requests are being passed to tomcat.
However, I am not getting to close the configuration of the
virtual host for you ally him www.admged.ufu.br in what is said
I respect Tomcat.
The virtual host in the Apache is configured as having shown
below:
NameVirtualHost 200.131.195.9
<VirtualHost 200.131.195.9>
DocumentRoot /web/admged
ServerName www.admged.ufu.br
</VirtualHost>
My directory tree is the following:
/web/
|-- admged
|-- WEB-INF
| `-- classes
`-- logs
Where:
/web -> point of assembly of my directory tree
admged -> folder where I will put the files. jsp
WEB-INF
classes -> folder where I will put the classes java
I would like to know how the structure of JkMount would be for the
Virtual Host in the Apache and also the configuration of the contexts
in server.xml
Sebasti�o Carlos Santos
Oracle Database Administrator
Universidade Federal de Uberl�ndia - UFU
Gratifica��o de Est�mulo � Doc�ncia - GED
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>