You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nick Stoianov <ni...@yaya.com> on 2001/06/19 02:24:52 UTC
please help with mod_jk
Hi,
I'm having the following problem:
I am running Apache (on Linux) , tomcat and mod_jk
I have a virtual host and the entry for this virtual host in httpd.conf is the following:
------------------------------------------------------------------------------
NameVirtualHost 192.168.100.145
<VirtualHost 192.168.100.145>
ServerAdmin mymail@myserver.com
DocumentRoot /usr/local/apache/html/test
DirectoryIndex index.html
ServerName test1.myserver.com
CustomLog /var/log/httpd/access_log common
JkMount /*.jsp ajp12
JkMount /servlets/* ajp12
</VirtualHost>
-----------------------------------------------------------------------------
In /usr/local/tomcat/webapps I have a directory test with WEB-INF subdirectory
In server.xml I have the following entry:
--------------------------
<Host name="test1.myserver.com" >
<Context path=""
docBase="/usr/local/tomcat/webapps/test" />
<Context path="/servlets"
docBase="/usr/local/tomcat/webapps/sam/WEB-INF/classes" />
</Host>
--------------------------
I have put my servlets in /usr/local/tomcat/webapps/sam/WEB-INF/classes and my HTML files are in:
/usr/local/apache/html/test
When I start Apache and Tomcat and try to call a servlet from the servlet directory (e.g. http://test1.myserver.com/servlets/name_of_the_servlet) I get ERROR 404 - File not found
I know I'm doing something wrong - but I really don't know what. Please help
Nick
Re: please help with mod_jk
Posted by Dmitri Colebatch <di...@nuix.com.au>.
You'll need to put the same virtual host in the server.xml as in your
httpd.conf.
cheers
dim
On Tue, 19 Jun 2001 10:24, you wrote:
> Hi,
>
> I'm having the following problem:
>
> I am running Apache (on Linux) , tomcat and mod_jk
>
> I have a virtual host and the entry for this virtual host in httpd.conf is
> the following:
> ---------------------------------------------------------------------------
>--- NameVirtualHost 192.168.100.145
>
> <VirtualHost 192.168.100.145>
> ServerAdmin mymail@myserver.com
> DocumentRoot /usr/local/apache/html/test
> DirectoryIndex index.html
> ServerName test1.myserver.com
> CustomLog /var/log/httpd/access_log common
> JkMount /*.jsp ajp12
> JkMount /servlets/* ajp12
> </VirtualHost>
> ---------------------------------------------------------------------------
>--
>
> In /usr/local/tomcat/webapps I have a directory test with WEB-INF
> subdirectory
>
> In server.xml I have the following entry:
> --------------------------
> <Host name="test1.myserver.com" >
> <Context path=""
> docBase="/usr/local/tomcat/webapps/test" />
> <Context path="/servlets"
> docBase="/usr/local/tomcat/webapps/sam/WEB-INF/classes" />
> </Host>
> --------------------------
>
> I have put my servlets in /usr/local/tomcat/webapps/sam/WEB-INF/classes
> and my HTML files are in: /usr/local/apache/html/test
>
> When I start Apache and Tomcat and try to call a servlet from the servlet
> directory (e.g. http://test1.myserver.com/servlets/name_of_the_servlet) I
> get ERROR 404 - File not found
>
>
> I know I'm doing something wrong - but I really don't know what. Please
> help
>
> Nick
----------------------------------------
Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1"
Content-Transfer-Encoding: quoted-printable
Content-Description:
----------------------------------------