You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Cleber Hostalácio de Melo <cl...@mg.gov.br> on 2002/02/27 17:24:58 UTC

Tomcat x Apache

Hi,

I have linux  (kernel 2.4.5), apache 1.3.19 and
Tomacat 4.0.2

Tomcat are working well with the url:
  http://Myserv:tomcat_port/examples/jsp/index.html

But when I try to access this application from Apache with the
URL:

  http://Myserv/examples/jsp/index.html


I receive the message in my browser:

Forbidden
You don't have permission to access /examples/jsp/index.html on this
server.

The corresponding entries in the Apache logs are:

httpd/logs/access.log:
  "GET /examples/jsp/index.html HTTP/1.0" 403 301

httpd/logs/error.log:
  [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot
read directory for multi: /examples/jsp/

There is no entry in the Tomcat logs which looks like that Apache is not

even trying to
connect to Tomcat.

My configuration files are:

httpd.com

.....
ServerName myServer
ServerType standalone
ServerRoot /etc/httpd
......
LoadModule ....
LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so
......
AddModule    ....
AddModule mod_webapp.c
......
DocumentRoot "/home/myDocs"
......
WebAppConnection Tomcat_Apache warp localhost:8008
WebAppDeploy examples Tomcat_Apache /examples/


server.xml

.....
<Service name="Tomcat_Apache">
<Connector
  className="org.apache.catalina.connector.warp.WarpConnector"
  port="8008" minProcessors="5" maxProcessors="75"
  enableLookups="true"
  acceptCount="10" debug="0"/>

  <!-- Replace "localhost" with what your Apache "ServerName" is set to
-->
  <Engine className="org.apache.catalina.connector.warp.WarpEngine"
   name="localhost" debug="0" appBase="webapps">
   .....
   </Engine>
</Service>

Anyone has any idea what could be the problem?

Thanks.





--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Tomcat x Apache

Posted by Ion Larrañaga <il...@s21sec.com>.
Sorry for my mistake. You are right that Apache should redirect the request
to Tomcat directly. This means I should read messages more carefully ;)

Are you able to access static pages with Apache? Do you have an index.html
in "/home/myDocs" to test if you can access http://your.server/index.html ?

I think that maybe Apache is denying you access before sending the request
to
mod_webapp. This may be if you have only changed your DocumentRoot directive
without granting access to it. Have you changed the <Directory> where it
says
"This should be changed to whatever you set DocumentRoot to" ?

Hope it helps,

   Ion


-----Mensaje original-----
De: Cleber Hostalácio de Melo [mailto:cleber@mg.gov.br]
Enviado el: miércoles, 27 de febrero de 2002 18:28
Para: Tomcat Users List
Asunto: Re: Tomcat x Apache


My  webapps directory and all its directories are read and execute free for
all users. So I don´t think this is the problem.

Any way, I think Apache should pass all the /examples requests to
Tomcat and not trying to read the directly from the file system.

It looks more that Apache is not allowed to connect to Tomcat. I´ve
already check all the possibilities but could not find any parameter(s) in
httpd.conf or server.xml that could prevent the connection.

Any other clue?

Thank you.


Ion Larranaga wrote:

> Does your apache user ("nobody" by default) have access
> to the physical directory? Perhaps that directory belongs
> to the user you start Tomcat with (maybe "root"?) and
> "nobody" has no read access to it.
>
> Hope it helps,
>
>   Ion
>
> -----Mensaje original-----
> De: Cleber Hostalacio de Melo [mailto:cleber@mg.gov.br]
> Enviado el: miercoles, 27 de febrero de 2002 17:25
> Para: tomcat-user@jakarta.apache.org
> Asunto: Tomcat x Apache
>
> Hi,
>
> I have linux  (kernel 2.4.5), apache 1.3.19 and
> Tomacat 4.0.2
>
> Tomcat are working well with the url:
>   http://Myserv:tomcat_port/examples/jsp/index.html
>
> But when I try to access this application from Apache with the
> URL:
>
>   http://Myserv/examples/jsp/index.html
>
> I receive the message in my browser:
>
> Forbidden
> You don't have permission to access /examples/jsp/index.html on this
> server.
>
> The corresponding entries in the Apache logs are:
>
> httpd/logs/access.log:
>   "GET /examples/jsp/index.html HTTP/1.0" 403 301
>
> httpd/logs/error.log:
>   [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot
> read directory for multi: /examples/jsp/
>
> There is no entry in the Tomcat logs which looks like that Apache is not
>
> even trying to
> connect to Tomcat.
>
> My configuration files are:
>
> httpd.com
>
> .....
> ServerName myServer
> ServerType standalone
> ServerRoot /etc/httpd
> ......
> LoadModule ....
> LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so
> ......
> AddModule    ....
> AddModule mod_webapp.c
> ......
> DocumentRoot "/home/myDocs"
> ......
> WebAppConnection Tomcat_Apache warp localhost:8008
> WebAppDeploy examples Tomcat_Apache /examples/
>
> server.xml
>
> .....
> <Service name="Tomcat_Apache">
> <Connector
>   className="org.apache.catalina.connector.warp.WarpConnector"
>   port="8008" minProcessors="5" maxProcessors="75"
>   enableLookups="true"
>   acceptCount="10" debug="0"/>
>
>   <!-- Replace "localhost" with what your Apache "ServerName" is set to
> -->
>   <Engine className="org.apache.catalina.connector.warp.WarpEngine"
>    name="localhost" debug="0" appBase="webapps">
>    .....
>    </Engine>
> </Service>
>
> Anyone has any idea what could be the problem?
>
> Thanks.
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Tomcat x Apache

Posted by Cleber Hostalácio de Melo <cl...@mg.gov.br>.
My  webapps directory and all its directories are read and execute free for
all users. So I don´t think this is the problem.

Any way, I think Apache should pass all the /examples requests to
Tomcat and not trying to read the directly from the file system.

It looks more that Apache is not allowed to connect to Tomcat. I´ve
already check all the possibilities but could not find any parameter(s) in
httpd.conf or server.xml that could prevent the connection.

Any other clue?

Thank you.


Ion Larranaga wrote:

> Does your apache user ("nobody" by default) have access
> to the physical directory? Perhaps that directory belongs
> to the user you start Tomcat with (maybe "root"?) and
> "nobody" has no read access to it.
>
> Hope it helps,
>
>   Ion
>
> -----Mensaje original-----
> De: Cleber Hostalacio de Melo [mailto:cleber@mg.gov.br]
> Enviado el: miercoles, 27 de febrero de 2002 17:25
> Para: tomcat-user@jakarta.apache.org
> Asunto: Tomcat x Apache
>
> Hi,
>
> I have linux  (kernel 2.4.5), apache 1.3.19 and
> Tomacat 4.0.2
>
> Tomcat are working well with the url:
>   http://Myserv:tomcat_port/examples/jsp/index.html
>
> But when I try to access this application from Apache with the
> URL:
>
>   http://Myserv/examples/jsp/index.html
>
> I receive the message in my browser:
>
> Forbidden
> You don't have permission to access /examples/jsp/index.html on this
> server.
>
> The corresponding entries in the Apache logs are:
>
> httpd/logs/access.log:
>   "GET /examples/jsp/index.html HTTP/1.0" 403 301
>
> httpd/logs/error.log:
>   [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot
> read directory for multi: /examples/jsp/
>
> There is no entry in the Tomcat logs which looks like that Apache is not
>
> even trying to
> connect to Tomcat.
>
> My configuration files are:
>
> httpd.com
>
> .....
> ServerName myServer
> ServerType standalone
> ServerRoot /etc/httpd
> ......
> LoadModule ....
> LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so
> ......
> AddModule    ....
> AddModule mod_webapp.c
> ......
> DocumentRoot "/home/myDocs"
> ......
> WebAppConnection Tomcat_Apache warp localhost:8008
> WebAppDeploy examples Tomcat_Apache /examples/
>
> server.xml
>
> .....
> <Service name="Tomcat_Apache">
> <Connector
>   className="org.apache.catalina.connector.warp.WarpConnector"
>   port="8008" minProcessors="5" maxProcessors="75"
>   enableLookups="true"
>   acceptCount="10" debug="0"/>
>
>   <!-- Replace "localhost" with what your Apache "ServerName" is set to
> -->
>   <Engine className="org.apache.catalina.connector.warp.WarpEngine"
>    name="localhost" debug="0" appBase="webapps">
>    .....
>    </Engine>
> </Service>
>
> Anyone has any idea what could be the problem?
>
> Thanks.
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Tomcat x Apache

Posted by Ion Larranaga <il...@s21sec.com>.
Does your apache user ("nobody" by default) have access
to the physical directory? Perhaps that directory belongs
to the user you start Tomcat with (maybe "root"?) and 
"nobody" has no read access to it.

Hope it helps,

  Ion

-----Mensaje original-----
De: Cleber Hostalacio de Melo [mailto:cleber@mg.gov.br]
Enviado el: miercoles, 27 de febrero de 2002 17:25
Para: tomcat-user@jakarta.apache.org
Asunto: Tomcat x Apache


Hi,

I have linux  (kernel 2.4.5), apache 1.3.19 and
Tomacat 4.0.2

Tomcat are working well with the url:
  http://Myserv:tomcat_port/examples/jsp/index.html

But when I try to access this application from Apache with the
URL:

  http://Myserv/examples/jsp/index.html


I receive the message in my browser:

Forbidden
You don't have permission to access /examples/jsp/index.html on this
server.

The corresponding entries in the Apache logs are:

httpd/logs/access.log:
  "GET /examples/jsp/index.html HTTP/1.0" 403 301

httpd/logs/error.log:
  [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot
read directory for multi: /examples/jsp/

There is no entry in the Tomcat logs which looks like that Apache is not

even trying to
connect to Tomcat.

My configuration files are:

httpd.com

.....
ServerName myServer
ServerType standalone
ServerRoot /etc/httpd
......
LoadModule ....
LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so
......
AddModule    ....
AddModule mod_webapp.c
......
DocumentRoot "/home/myDocs"
......
WebAppConnection Tomcat_Apache warp localhost:8008
WebAppDeploy examples Tomcat_Apache /examples/


server.xml

.....
<Service name="Tomcat_Apache">
<Connector
  className="org.apache.catalina.connector.warp.WarpConnector"
  port="8008" minProcessors="5" maxProcessors="75"
  enableLookups="true"
  acceptCount="10" debug="0"/>

  <!-- Replace "localhost" with what your Apache "ServerName" is set to
-->
  <Engine className="org.apache.catalina.connector.warp.WarpEngine"
   name="localhost" debug="0" appBase="webapps">
   .....
   </Engine>
</Service>

Anyone has any idea what could be the problem?

Thanks.





--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>