Tomcat 4.0.1 & Apache 1.3.22 & mod_webapp & virtual hosts
I have succesfully been able to get tomcat 4.0.1 and apache 1.3.22 to use mod_webapp in both linux and windows.
First problem:
If I don't include a trailing slash, my webapp will not display. Just a 404. mod_dir works on the apache end. Also if I access my context thru tomcat on port 8080, without a trailing slash, it will put one in for me. Only when using mod_webapp, it doesn't seem to work.
So...
http://localhost/examples <--- doesn't work
http://localhost/examples/ <--- works
Second problem:
How can I get virtual hosts working with mod_webapp? I've successfully been using mod_jk for a while now with virtualhosts, but there are no instructions on how to do this with mod_webapp. Has anyone been able to do this? Is it even possible? Is there a way to alias a /webapp to '/' or something?
Any help/suggestions are appreciated,
Tom
Unfortunately, Tomcat 4.0.1 use the port number 8180 as default. Just after the installation, you need to test it by typing:
http://localhost:8180/
If the index page of Tomcat appears, then you succeed.
On linux platform the webapps directory need to be downloaded for a separate package. For downloads, please visit here:
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/rpms/tomcat4-webapps-4.0.1-1.noarch.rpm
Such webapps should be installed in {TOMCAT_HOME}/webapps. After all, just restart the Tomcat server (as I know) and see the results by typing:
http://localhost:8180/
Click on the link to see further examples.
Good luck!
Similar Messages
-
Apache-weblogic bridge problems with virtual hosting
Hi,
Can we set apache-weblogic bridge where apache webserver is configured
as virtual hosts and each Virtual Host is mapped to a WebLogic server
instance running on separate port ?
Please provide doc or reference or your comments if you have solved this
problem
Thanks
ShriniwasThe above comments notwithstanding, there's one outstanding line in your post that seems crucial:
Also if I type on my browser the name of another secondary (or virtual) domain name in the form http://domain2.com it brings the website hosted under the primary domain which is domain1.com. In case I type http://www.domain2.com than it works as it should and displays the website hosted under this domain name.
As far as Apache is concerned, 'domain2.com' and 'www.domain2.com' are completely separate entities. They have to be otherwise if all domain2.com traffic went to this site you'd never be able to host different sites within the domain (e.g. blogs.domain2.com, wiki.domain2.com, blah.domain2.com, etc.). In other words, there is no automatic relationship between a hostname and sub-records of that hostname.
So what's happening here is Apache is seeing a request for 'domain2.com' which does not match any of its configured virtual hosts, so it handles the request via the default site. If you request www.domain2.com this matches your virtual host configuration so Apache serves the alternate content.
The fix is simple - trivial, even - you just need to tell Apache all the hostnames that match this site - in this case if you've configured the site's primary address as 'www.domain2.com' and you want it to also respond to requests to 'domain2.com' then add 'domain2.com' to the list of Server Aliases in Server Admin. -
Hello,
I have dedicated server (XEN) with lvm partitions and created 3 virtual private servers with OS=centOS enterprise linux 5.x.
on vps(s) apache-tomcat-6.0.18 installed with tomcat-connectors-1.2.27
I want to create virtual hosts for tomcat. read some articles and created successfully on my pc tomcat-5.x.x but I am not finding on the server some folders of the tomcat i.e. common, shared and conf/Catalina/ to create virtual hosts according to some articles. I made these folders on the server but not working.
Kindly let me know how can I create virtual hosts with tomcat-6.0.18
Thanks & best regardsfarakh wrote:
[...] but not working. Could you try being any more vague?
You need to provide a lot more details. At least tell us what "not working" means. What error messages do you get?
Learn [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html]. -
Virtual Hosts in Apache HTTP Server
How to configure virtual hosts in Apache HTTP Server httpd.conf file.
If I want to access my server with some other name(alias), how can I do this ?
Suggestions in this matter would be highly helpful.
Thanks
Vidhyut AroraFollowing is a note explaining how to setup
Virtual hosts.
Hope this helps
Ranga
Note:70647.1
Subject: Apache Server Virtual Hosting
Last Revision Date: 07-JUN-2001
PURPOSE
This document discusses considerations for setting up virtual hosts on an
Apache machine, to include how to get the hostname working and how to
configure Apache.
SCOPE & APPLICATION
The information in this document is intended for those who manage multiple sites
using an Apache machine.
REFERENCES
First published in Apache Week issue 31 (6th September 1996)
Last update 20th September 1998
Using Virtual Hosts
Virtual Hosts let you run multiple independent Web sites on a single host with
a single Apache setup.
One of the most important facilities in Apache is its ability to run virtual
hosts. This is now the essential way to run multiple Web services - each with
different host names and URLs - that appear to be completely separate sites.
This is widely used by ISPs, hosting sites and content providers who need to
manage multiple sites but do not want to buy a new machine for each one.
Picking an IP address
There are two types of virtual hosts: IP-based and non-IP-based. The former is
where each virtual host has its own IP address. You must have a new IP address
for each virtual host you want to set up, either from your existing allocation
or by obtaining more from your service provider. When you have extra IP
addresses, you tell your machine to handle them. On some operating systems, you
can give a single ethernet interface multiple addresses (typically with an
fconfig alias command). On other systems, you must have a different
physical interface for each IP address (typically by buying extra ethernet
cards).
IP addresses are a resource that costs money and are increasingly difficult to
get, so modern browsers can now also use 'non-IP' virtual hosts. This
lets you use the same IP address for multiple host names. When the server
receives an incoming Web connection, it does not know the hostname that was used
in the URL. However, the new HTTP/1.1 specification adds a facility where the
browser must tell the server the hostname it is using, on the Host: header. If
an older browser connects to a non-IP virtual host, it does not send the Host:
header, so the server must respond with a list of possible virtual
hosts. Apache provides some help for configuring a site for both old and new
browsers.
Picking a Hostname and Updating the DNS
Having selected an IP address, the next stage is to update the DNS so that
browsers can convert the hostname into the right address. The DNS is the system
that every machine connected to the internet uses to find the IP address of host
names. If your hostname is not in the DNS, no one can connect to
your server (except by the unfriendly IP address).
If the virtual hostname you are going to use is under your existing domain,
you can just add the record into your own DNS server. If the virtual hostname
is in someone else's domain, you must get them to add it to their DNS
server files. In some cases, you want to use a domain not yet used on the
internet, in which case you must apply for the domain name from the
InterNIC and set up the primary and secondary DNS servers for it, before adding
the entry for your virtual host.
In any of these cases, the entry you need to add to the DNS is an address record
(an A record) pointing to the appropriate IP address. For example, say you want
the domain www.my-dom.com to access your host with IP address 10.1.2.3: you
must add the following line to the DNS zone file for my-dom.com:
www A 10.1.2.3
Now, users can enter http://www.my-dom.com/ as a URL in their browsers and get
to your Web server. However, it will return the same information as if the
machine's original hostname had been used. So, the final stage is to tell Apache
how to respond differently to the different addresses.
How Apache Handles Virtual Hosts
Configuring Apache for virtual hosts is a two-stage process. First, it needs
to be told which IP addresses (and ports) to listen to for incoming Web
connections. By default, Apache listens to port 80 on all IP addresses of the
local machine, and this is often sufficient. If you have a more complex
requirement, such as listening on various port numbers, or only to specific IP
addresses, then the BindAddress or Listen directives can be used.
Second, having accepted an incoming Web connection, the server must be
configured to handle the request differently, depending on what virtual host it
was addressed to. This usually involves configuring Apache to use a different
DocumentRoot.
Telling Apache Which Addresses to Listen To
If you are happy for Apache to listen to all local IP addresses on the port
specified by the Port directive, you can skip this section. However, there are
some cases where you want to use the directives explained here:
- If you have many IP addresses on the machine but only want to run a Web
server on some of them
- If one or more of your virtual hosts is on a different port
- If you want to run multiple copies of the Apache server serving different virtual
hosts
There are two ways of telling Apache what addresses and ports to listen to:
- Use the BindAddress directive to specify a single address or port
- Use the Listen directive to any number of specific addresses or ports
For example, if you run your main server on IP address 10.1.2.3 port 80, and a
virtual host on IP 10.1.2.4 port 8000, you would use:
Listen 10.1.2.3:80
Listen 10.1.2.4:8000
Listen and BindAddress are documented on the Apache site.
Configuring the Virtual Hosts
Having gotten Apache to listen to the appropriate IP addresses and ports, the
final stage is to configure the server to behave differently for requests on
each of the different addresses. This is done using <VirtualHost> sections in
the configuration files, normally in httpd.conf.
A typical (but minimal) virtual host configuration looks like this:
<VirtualHost 10.1.2.3>
DocumentRoot /www/vhost1
ServerName www.my-dom.com
</VirtualHost>
This should be placed in the httpd.conf file. You replace the text
10.1.2.3 with one of your virtual host IP addresses. If you want to specify a
port as well, follow the IP address with a colon and the port number
(example: 10.1.2.4:8000). If omitted, the port defaults to 80.
If no <VirtualHost> sections are given in the configuration files, Apache
treats requests from the different addresses and ports identically. In terms of
setting up virtual hosts, we call the default behavior the main server
configuration. Unless overridden by <VirtualHost> sections, the main server
behaviour is inherited by all the virtual hosts. When configuring virtual
hosts, you must decide what changes to make in each of the virtual
host configurations.
Any directives inside a <VirtualHost> section apply to just that virtual host.
The directives either override the configuration give in the main server, or
supplement it, depending on the directive. For example, the DocumentRoot
directive in a <VirtualHost> section overrides the main server's DocumentRoot,
while AddType supplements the main server's mime types.
Now, when a request arrives, Apache uses the IP address and port it arrived on
to find a matching virtual host configuration. If no virtual host matches the
address and port, it is handled by the main server configuration. If it does
match a virtual host address, Apache uses the configuration of that virtual
server to handle the request.
For the example above, the server configuration used is the same as the
main server, except that the DocumentRoot is /www/vhost1, and the
ServerName is www.my-dom.com. Directives commonly set in <VirtualHost>
sections are DocumentRoot, ServerName, ErrorLog and TransferLog. Directives
that deal with handling requests and resources are valid inside <VirtualHost>
sections. However, some directives are not valid inside <VirtualHost> sections,
including BindAddress, StartSevers, Listen, Group and User.
You can have as many <VirtualHost> sections as you want. You can
leave one or more of your virtual hosts being handled by the main server, or
have a <VirtualHost> for every available address and port, and leave the main
server with no requests to handle.
VirtualHost sections for non-IP Virtual Hosts
Non-IP virtual hosts are configured in a very similar way. The IP address that
the requests arrive on is given in the <VirtualHost> directive, and the
host name is put in the ServerName directive. The difference is that there
(usually) is more than one <VirtualHost> section handling the same IP address.
For Apache to know whether a request arriving on a particular IP
address is supposed to be a name-based requests, the NameVirtualHost directive
addresses for name-based requests. A virtual host can handle more than one
non-IP hostname by using the ServerAlias directive, in addition to the
ServerName.
null -
Setting up Virtual Host in Apache for UCM Sites
As the subject says: I am trying to setup virtual hosts in apache for UCM Sites. Now we are trying to set it up so for every site in UCM we have one ip address. So on the browser when I see someone typed in "http://www.myfirstsite.com" (through the magic of dns they get routed to my server). Once they are at the server in Apache I want to setup virtual hosts so I can redirect user to the proper site residing in UCM.
Now, it is possible for me to access the sites by doing this "http://myservername/myfirstsite". But what I want to setup in Apache is that when someone types in "http://www.myfirstsite.com" they see which ever site I want them to see in UCM. But mann I just don't know what would be the document root or how would I go about getting the users to SEE what I want them to see. Can anyone help me with this please? Thanks in advance.You should be able to stick with the default apache config where it will answer for any hostname and create virtual hosts for each instance with the document root appropriate for that CS instance. Then you should be able use rewrite rules to direct users to the appropriate virtual host depending on what URL they access the server with. Check out the documentation for Apache around mod_rewrite: http://httpd.apache.org/docs/current/rewrite/
-
Apache Virtual Hosts and Weblogic 5.1SP6
Running:
WebLogic Server 5.1.0 w/ Service Pack 6
Solaris 7
Hello, I've been reading through the newsgroups and saw alot of information on
setting up apache and weblogic to handle virtual hosts, but am still having problems
getting it to work.
I have 2 domains that will be served up by one instance of Apache using NameBased
virtual hosts and I would like to have our one instance of WebLogic 5.1SP6 handle
them as well.
Excerpt from my httpd.conf file:
NameVirtualHost 216.xx.x.xx:80
<VirtualHost vcstgws011:80>
ServerName vcstgws011.domain1.com
Port 80
DocumentRoot /opt/vci-10.8/webapps/www
DirectoryIndex index.jsp
<Directory "/opt/vci-10.8/webapps/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost vcstgws011:80>
ServerName www.domain2.com
Port 80
DocumentRoot /opt/vci-10.8/webapps/www/dsl
DirectoryIndex index.jsp
<Directory "/opt/vci-10.8/webapps/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Under my default server configuration I have the WebLogic stuff:
<IfDefine WL>
WebLogicCluster vcstgas011.domain1.com:7001
Debug on
DebugConfigInfo on
ConnectTimeoutSecs 60
HungServerRecoverSecs 300
Debug on
DebugConfigInfo on
<Files *.jsp>
SetHandler weblogic-handler
</Files>
<Location /weblogic>
SetHandler weblogic-handler
PathTrim /weblogic
</Location>
<Location /servlet>
SetHandler weblogic-handler
</Location>
<Location /Admin*>
SetHandler weblogic-handler
</Location>
<Location /j_security_check>
SetHandler weblogic-handler
</Location>
</IfDefine>
And here's an excerpt from my weblogic.properties file:
# HTTPD
weblogic.httpd.enable=true
# DocumentRoot configuration
weblogic.httpd.defaultWebApp=/opt/vci-10.8/webapps/www
weblogic.httpd.indexDirectories=true
Any help would be appreciated.
Thanks,
MarkAnyone have success with Name-Based virtual hosts using same instance of WebLogic?
"Mark Mangano" <[email protected]> wrote:
>
Running:
WebLogic Server 5.1.0 w/ Service Pack 6
Solaris 7
Hello, I've been reading through the newsgroups and saw alot of information
on
setting up apache and weblogic to handle virtual hosts, but am still
having problems
getting it to work.
I have 2 domains that will be served up by one instance of Apache using
NameBased
virtual hosts and I would like to have our one instance of WebLogic 5.1SP6
handle
them as well.
Excerpt from my httpd.conf file:
NameVirtualHost 216.xx.x.xx:80
<VirtualHost vcstgws011:80>
ServerName vcstgws011.domain1.com
Port 80
DocumentRoot /opt/vci-10.8/webapps/www
DirectoryIndex index.jsp
<Directory "/opt/vci-10.8/webapps/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost vcstgws011:80>
ServerName www.domain2.com
Port 80
DocumentRoot /opt/vci-10.8/webapps/www/dsl
DirectoryIndex index.jsp
<Directory "/opt/vci-10.8/webapps/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Under my default server configuration I have the WebLogic stuff:
<IfDefine WL>
WebLogicCluster vcstgas011.domain1.com:7001
Debug on
DebugConfigInfo on
ConnectTimeoutSecs 60
HungServerRecoverSecs 300
Debug on
DebugConfigInfo on
<Files *.jsp>
SetHandler weblogic-handler
</Files>
<Location /weblogic>
SetHandler weblogic-handler
PathTrim /weblogic
</Location>
<Location /servlet>
SetHandler weblogic-handler
</Location>
<Location /Admin*>
SetHandler weblogic-handler
</Location>
<Location /j_security_check>
SetHandler weblogic-handler
</Location>
</IfDefine>
And here's an excerpt from my weblogic.properties file:
# HTTPD
weblogic.httpd.enable=true
# DocumentRoot configuration
weblogic.httpd.defaultWebApp=/opt/vci-10.8/webapps/www
weblogic.httpd.indexDirectories=true
Any help would be appreciated.
Thanks,
Mark -
Using SSL with Apache Virtual Hosts
I am configuring Apache to use 3 virtual Host(Named base virtual Host).
I would like to run SSL on two of the 3 virtual host.
Do I need to gen a certificate for each virtual host or can I just use 1?William,
I thought I'd give my 2 cents on this...
Is there any particular reason as to why you are using named based virtual hosts?
Apache recommends using IP based virtual hosts over name based virtual hosts.
Go to http://httpd.apache.org/docs/dns-caveats.html and read the discussion on IP based virtual hosts and name based virtual hosts. The document describes the drawbacks to using the name-based approach.
Hope this helps!
-Manjeet -
Apache Bridge and Virtual Hosts?
Hi,
I'm running Apache 3.1.19 with the bridge to two clustered 'Weblogic
5.1sp8's - Apache is configured for several virtual hosts.
Is it better to run several instances of Apache each with its' own bridge -
not entirely sure how the bridge is written/operating so the concern is
that if the bridge blocks for one virtual host, it does so for all?
How can I find out more about the bridge and how it's written? I've also
heard mention of being able to configure the bridge to do weighted
load-balancing rather than simple round-robin - can't find this in the
bridge documentation though - can anyone help?
Thanks!
yrs James
James,
As my understanding of Apache plugin modules, it only supports
round-robin load balancing at this time.
Brian
"pipex news" <[email protected]> wrote:
>Hi,
>
>I'm running Apache 3.1.19 with the bridge to two clustered
>'Weblogic
>5.1sp8's - Apache is configured for several virtual hosts.
>
>Is it better to run several instances of Apache each with
>its' own bridge -
>not entirely sure how the bridge is written/operating
> so the concern is
>that if the bridge blocks for one virtual host, it does
>so for all?
>
>How can I find out more about the bridge and how it's
>written? I've also
>heard mention of being able to configure the bridge to
>do weighted
>load-balancing rather than simple round-robin - can't
>find this in the
>bridge documentation though - can anyone help?
>
>Thanks!
>
>yrs James
>
>
>
>
-
Weblogic, Apache and Virtual Hosts
Hello,
I have apache set for name-based Virtual Hosting (I'm serving 2 domains from the
same IP) and am running into the following problem:
Even though DOMAIN 2 has its own document root specified in the Apache httpd.conf
file, that is different than the document root for DOMAIN 1, both URLs are serving
up the same index.jsp from WebLogic (v. 5.1).
If I change the httpd.conf entry for DOMAIN 2, to serve up index.html instead
of index.jsp, it works????
Is there some setting I need in weblogic.properties???
Any help would be appreciated!!
Thanks,
Mark ManganoHello,
I have apache set for name-based Virtual Hosting (I'm serving 2 domains from the
same IP) and am running into the following problem:
Even though DOMAIN 2 has its own document root specified in the Apache httpd.conf
file, that is different than the document root for DOMAIN 1, both URLs are serving
up the same index.jsp from WebLogic (v. 5.1).
If I change the httpd.conf entry for DOMAIN 2, to serve up index.html instead
of index.jsp, it works????
Is there some setting I need in weblogic.properties???
Any help would be appreciated!!
Thanks,
Mark Mangano -
Apache+Tomcat access to static apache data from Tomcat
Hi,
Apache is in path /opt/apache
and tomcat is on /opt/apache/tomcat
I have to access to static data (/opt/apache/data) that is handled by my apache http server from my tomcat web application. Is there a way to do this in a clean way without doing things like this :
getServletCoontext().getRealPath(xxx) and doing some ../data manipulations
ThanksI'm not completely sure I fully understand your problem.
I do not recommend opening sockets to your own WLS instance. That is a
recipe for deadlock.
Can you just include the static file in your response?
-- Rob
Yol. wrote:
We have a WebApplication which is running on a WebLogic Server 6.1.
The clients access to the application via an Apache hosted in another machine.
The Apache server redirects the requests to the server except the static files
which are served by the Apache Server.
Nevertheless, we have a few static resources that are not requested by the external
clients but are requested by the application in the WLS. The problem is that to
make this, it access the resource via the WLS, that is, via an url. That makes
the WLS open at least one socket. This cause that after a few time, there are
too many sockets in the machine opened in TIME-WAIT state.
For some reasons it is not possible to change the configuration of the sockets
in the server hosting the WLS.
We would like to access to this resources that are in the war of the WebApllication
without opening a socket.
Is it possible? Any ideas or suggestions?
Many many thanks in advance,
Yol. -
Using tomcat 5 along with apache 2.2
hi
i am facing a strange problem
i am trying to build a web application using servlets with tomcat 5 and apache 2.2 and i am using oracle 10g as the data base
now when try to access the database from my pc it works fine but when i try to access it from other pc through lan its showing an exception
i am using mod_jk connector to forward the servlets requests to tomcat.
log file looks like this
2009-02-01 00:04:07 StandardContext[manager]HTMLManager: init: Associated with Deployer 'localhost'
2009-02-01 00:04:07 StandardContext[manager]HTMLManager: init: Global resources are available
2009-02-01 00:04:07 StandardContext[manager]HTMLManager: list: Listing contexts for virtual host 'localhost'
2009-02-01 00:04:23 StandardWrapperValve[home]: Servlet.service() for servlet home threw exception
java.lang.NullPointerException
at Home.doGet(Home.java:26)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)
please help me its my semister project
thanking youronit wrote:
java.lang.NullPointerException
at Home.doGet(Home.java:26)Some object reference at the mentioned line inside the mentioned method of the mentioned class is null while the code is trying to access/invoke it.
The solution should be obvious: make sure that it is not null, or only access/invoke it when it is not null.
That said, and apart from this specific problem, you should always be placing classes in packages. Not doing so is a bad practice and also asking for trouble. -
Tomcat 4.0 and Apache 2.0.35
Hello,
I am trying to install mod_jk or mod_webapp.so with Tomcat 4.0 and Apache 2.0.35, running on Windows XP Professional. When I try to start Apache, it fails to see it the new module in the modules/ directory, even though it's most definitely there. Anybody have any thoughts?The Tomcat 4 has different settings compared to the previous releases (Tomcat 3.3.x and Tomcat 3.2.x). If the previous releases use mod_jk.dll and/or mod_jk.so, the version 4 uses different modules. I have obtained the following from the server.xml file from Tomcat 4.0.3.
The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
as its servlet container. Please read the README.txt file coming with
the WebApp Module distribution on how to build it.
(Or check out the "jakarta-tomcat-connectors/webapp" CVS repository)
To configure the Apache side, you must ensure that you have the
"ServerName" and "Port" directives defined in "httpd.conf". Then,
lines like these to the bottom of your "httpd.conf" file:
LoadModule webapp_module libexec/mod_webapp.so
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples/
The next time you restart Apache (after restarting Tomcat, if needed)
the connection will be established, and all applications you make
visible via "WebAppDeploy" directives can be accessed through Apache. -
How to install Tomcat 1.4 on Apache Web Server
I'd like to know how to install Tomcat 1.4 on Apache web server. I cant find any instructions from the documentation that goes along with the Tomcat 1.4
1) Use mod_jk.dll. Obtain it from the jakarta's site. (It comes with Tomcat 3.3 and above)Put it in the apache's modules folder.
2) Modify httpd.conf of the A.W.S, append the following line to it:
include TOMCAT_HOME/conf/mod_jk.conf-auto
3) Start Apache W.S first, then restart Tomcat.
It's simple and hope this works!
Rommel Sharma. -
Hello,
I have an web application that runs perfectly in Tomcat 5.5 when running tomcat stand-alone.
I also have Apache HTTP server integrated with Tomcat using the jk connector and running virtual hosts in a mod_jk.conf file, which is working for html files. When I run apache and tomcat at the same time, the jsp opens but the servlet cannot get a database connection.
To run virtual hosts and apache and tomcat, I added this host container to server.xml:
<Host name="www.mydomain.com" debug="0" appBase="d:/WebApps/mydomain"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="" debug="0"/>
</Host>
Does anybody see anything wrong with this? Is there some reason why the context.xml (which contains the database info) is not being read?
Any suggestions are greatly appreciated.
Thank you,
LoganHi,
In the docmentation of Tomcat 5.x is written that is not recommended to put <context> element in the server.xml file. Create a file in CATALINA_HOME/conf/Catalina/www.mydomain.com/ with an XML extension. For example context.xml. In files like this you should write all of your <context> elements. -
Problem getting db connection when using virtual hosts / tomcat / apache
Hello,
I have servlets that use a connection pool to query an oracle database. When running Tomcat 5.5 stand-alone, everything works fine. But the same servlets do not work when running them on a server tomcat and apache integrated with jk and using virtual hosts. The problem is the connection pool, because servlets not using the pool also work fine.
Does anybody have any idea why this is happening?
Thank you.
LoganHi Saish,
Thank you for helping.
Try connecting with the machinen's IP, if this is a viable strategy for you (meaning the database IP is not dynamically assigned).I'm not sure how to do this. Here is a copy of my context.xml:
<Context path="" docBase="" debug="0">
<Resource name="jdbc/CraigsList" auth="Container"
type="javax.sql.DataSource" username="craigslist" password="xxxxxx"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:GRI"
maxActive="8" maxIdle="4"/>
</Context>
Does this help?
Thanks.
Maybe you are looking for
-
Opening an application in the dimension library.
I am trying to edit an application using the dimension library but when i click on dimension library and then open my shared library, I do not see my application. Please help. Thanks,
-
Final Cut Pro X crashes on start
I've been having an issue this morning. Final Cut crashes as soon as it starts. I was going to delete it and install fresh, however, it won't let me. Keeps saying the file is locked, even though it isn't. I've tried a few apps that are supposed to
-
Hello, There is a issue when you zoom in using a XY graph. Say you have a two points one at 0,0 and another at 10000,10. If you zoom in to say point 5000,5 the centre point the line will be way off nowhere near where it should be crossing. I was wond
-
Photo file names in ipad changed with last update, how can I change them ?
When I transfered photos from my SD card to the ipad, it created an event naming it after the date pictures were taken, after last ipad OS update SOME of the events names changed to 126IMPRT, xxxIMPRT, etc not even in order of date taken, and the oth
-
I was wondering is someone could help me figure out why my spry menu doubles up on the last menu item in IE. Under "Industrial" the drop down items are short and double up. test.dalube.com I have been messing with thing for months and searching all t