It doesn't matter if Apache is installed as root...it doesn't run as root.
It starts as root so that it can bind to port 80, but all HTTP requests are
handled by forked children that run as a non-root user specified by the
administrator (typically user nobody, group nobody).  This is for security.

Thus, your Apache user needs permissions to the Tomcat directory
tree...starting Apache as root will not provide "root override" on those
permissions automatically.

John


> -----Original Message-----
> From: Irwan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 4:50 AM
> To: Tomcat Users List
> Subject: Re: Apache cannot serve html files in webapp directory
> 
> 
> Bill Barker wrote:
> 
> >Usually this is a problem with file permissions.  The Apache 
> user (I think
> >that this defaults to "apache" on RedHat, but I don't use 
> RedHat that much)
> >needs to have read+execute permissions on all directories 
> upto and including
> >the "examples" directory.  In practice, this usually means 
> that they all
> >need rwxr-xr-x permissions, unless you want to setup group 
> access yourself.
> >
> >"Irwan" <[EMAIL PROTECTED]> wrote in message
> >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >>Hi all,
> >>
> >>I have installed mod_jk  but cannot get apache to serve 
> html files from
> >>tomcat webapp. The interesting thing, Apache can serve gif files but
> >>when the request is for html files, it returns this:
> >>
> >> Forbidden
> >>
> >>You don't have permission to access /examples/index.html on 
> this server.
> >>
> >>Additionally, a 403 Forbidden error was encountered while 
> trying to use
> >>an ErrorDocument to handle the request.
> >>
> >>------------------------------------------------------------
> ------------
> >>Apache/2.0.43 Server at 192.168.0.1 Port 80
> >>
> >>I have verified that Tomcat can serve the html thru the 
> 8080 port. Here
> >>is my http.conf files. I followed what was written in 
> Tomcat website on
> >>how to  configure Apache:
> >>
> >>http.conf:
> >>
> >># Load mod_jk module
> >>LoadModule jk_module /usr/lib/apache2/mod_jk.so
> >>
> >>Alias /examples "/var/tomcat4/webapps/examples"
> >>
> >><Directory "/var/tomcat4/webapps/examples">
> >>   Allow from all
> >></Directory>
> >>
> >># Where to find workers.properties
> >>JkWorkersFile /etc/httpd2/conf/workers.properties
> >>
> >># Send servlet for context /examples to worker named worker1
> >>JkMount /examples/servlet/* ajp13
> >>
> >># Send JSPs for context /examples to worker named worker1
> >>JkMount /examples/*.jsp ajp13
> >>----end of http.conf extract--------
> >>
> >>My environment is:
> >>Apache 2.0.43
> >>Red Hat Linux 7.3
> >>Tomcat  4.1.12
> >>mod_jk-ap20-1.2.0-2jpp.i386.rpm
> >>
> >>Can anyone help please.
> >>
> >>Regards, eone
> >>
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
Hi Bill,

It worked. What I do not understand is both Apache and Tomcat were 
installed as root so Apache should have access to Tomcat webapp, or do 
they. Thanks for the help

Rgds,
Irwan

>
>




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

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

Reply via email to