You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andreas Schneider <sc...@gmx.net> on 2008/03/20 10:07:10 UTC
[users@httpd] Tomcat 6 / Apache 2.2 integration problem (no images, no css loaded)
Hi,
I am trying to use my tomcat 6 over Apache 2.2. I have deployed a war called
sw-builder.war into the webapps folder of the tomcat instance. After
restarting tomcat and apache Tomcat extracts the war into the webapps folder
and into the temp folder (temp/0-sw-builder). The directory structure of
sw-builder is :
sw-builder
login.jsp
|_ images
|_ css
Now I have the problem, that when I call
http://localhost/sw-builder/login.jsp no images will be displayed. Here the
error log entries.
[Wed Mar 19 14:57:10 2008] [notice] Child 4384: Child process is running
[Wed Mar 19 14:57:10 2008] [notice] Child 4384: Acquired the start mutex.
[Wed Mar 19 14:57:10 2008] [notice] Child 4384: Starting 64 worker threads.
[Wed Mar 19 14:57:10 2008] [notice] Child 4384: Starting thread to listen on
port 80.
[Wed Mar 19 14:57:27 2008] [error] [client 127.0.0.1] client denied by
server configuration:
E:/server/apache-tomcat-6.0/temp/0-sw-builder/images/blank.gif, referer:
http://localhost/sw-builder/login.jsp
[Wed Mar 19 14:57:27 2008] [error] [client 127.0.0.1] client denied by
server configuration: E:/server/apache-tomcat-6.0/temp/0-sw-builder/ci.css,
referer: http://localhost/sw-builder/login.jsp
I am using the auto configuration of tomcat which creates following
mod_jk.conf:
----------------------------------------------------------------------------
------------------------------------
#################### localhost:/sw-builder ####################
# Static files
Alias /sw-builder "E:/server/apache-tomcat-6.0/temp/0-sw-builder"
<Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder">
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp
</Directory>
# Deny direct access to WEB-INF and META-INF
#
<Location "/sw-builder/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/sw-builder/META-INF/*">
AllowOverride None
deny from all
</Location>
#
# Use Directory too. On Windows, Location doesn't work unless
casematches
#
<Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder/WEB-INF/">
AllowOverride None
deny from all
</Directory>
<Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder/META-INF/">
AllowOverride None
deny from all
</Directory>
JkMount /sw-builder/*.jsp ajp13
JkMount /sw-builder/*.jspx ajp13
JkMount /sw-builder/student/actionServlet ajp13
JkMount /sw-builder/actionServlet ajp13
----------------------------------------------------------------------------
------------------------------------
The workers.properties looks like this:
----------------------------------------------------------------------------
------------------------------------
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
----------------------------------------------------------------------------
------------------------------------
In my http.conf I added the following lines:
----------------------------------------------------------------------------
------------------------------------
...
Include E:\server\apache-tomcat-6.0\conf\auto\mod_jk.conf
<Directory "E:/server/apache-tomcat-6.0/webapps/sw-builder">
Order allow,deny
Allow from all
</Directory>
...
----------------------------------------------------------------------------
------------------------------------
Can anybody help me with that problem?
Thanks
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Tomcat 6 / Apache 2.2 integration problem (no images,
no css loaded)
Posted by Michael Clark <mi...@metaparadigm.com>.
Andreas Schneider wrote:
> Michael Clark schrieb:
>> Andreas Schneider wrote:
>>
>>> [Wed Mar 19 14:57:27 2008] [error] [client 127.0.0.1] client denied by
>>> server configuration:
>>> E:/server/apache-tomcat-6.0/temp/0-sw-builder/ci.css,
>>> referer: http://localhost/sw-builder/login.jsp
>>>
>>>
>>
>> You have denies for the subdirectories of the expanded war but you don't
>> have an associated allow on that directory.
>>
>>
>>> <Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder">
>>> Options Indexes FollowSymLinks
>>> DirectoryIndex index.html index.htm index.jsp
>>>
>>
>> Try adding:
>>
>> AllowOverride None
>> allow from all
>>
>>
>
> Yes, that's working. My problem is, that this conf file is auto
> generated (%CATALINA_HOME%/conf/auto/mod_jk.conf). Should I add this
> to the http.conf? Is that a security problem to do this?
Yes, sounds reasonable. There shouldn't be a security issue.
Assuming tomcat only extracts web apps into its temp dir - and nothing
else can be accessed there unless it is explicitly mapped by a clause in
the generated conf file, then you might like to add a clause in your
httpd.conf for the parent of the extracted webapp dir (then all will
work when other webapps are deployed or if the auto-generated
subdirectory names changes). e.g.
<Directory "E:/server/apache-tomcat-6.0/temp/">
AllowOverride None
allow from all
</Directory>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Tomcat 6 / Apache 2.2 integration problem (no images,
no css loaded)
Posted by Andreas Schneider <sc...@gmx.net>.
Michael Clark schrieb:
> Andreas Schneider wrote:
>
>> [Wed Mar 19 14:57:27 2008] [error] [client 127.0.0.1] client denied by
>> server configuration: E:/server/apache-tomcat-6.0/temp/0-sw-builder/ci.css,
>> referer: http://localhost/sw-builder/login.jsp
>>
>>
>>
>
> You have denies for the subdirectories of the expanded war but you don't
> have an associated allow on that directory.
>
>
>> <Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder">
>> Options Indexes FollowSymLinks
>> DirectoryIndex index.html index.htm index.jsp
>>
>>
>
> Try adding:
>
> AllowOverride None
> allow from all
>
>
Yes, that's working. My problem is, that this conf file is auto
generated (%CATALINA_HOME%/conf/auto/mod_jk.conf). Should I add this
to the http.conf? Is that a security problem to do this?
>> </Directory>
>> # Deny direct access to WEB-INF and META-INF
>> #
>> <Location "/sw-builder/WEB-INF/*">
>> AllowOverride None
>> deny from all
>> </Location>
>>
>> <Location "/sw-builder/META-INF/*">
>> AllowOverride None
>> deny from all
>> </Location>
>> #
>> # Use Directory too. On Windows, Location doesn't work unless
>> casematches
>> #
>> <Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder/WEB-INF/">
>> AllowOverride None
>> deny from all
>> </Directory>
>>
>> <Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder/META-INF/">
>> AllowOverride None
>> deny from all
>> </Directory>
>>
>> JkMount /sw-builder/*.jsp ajp13
>> JkMount /sw-builder/*.jspx ajp13
>> JkMount /sw-builder/student/actionServlet ajp13
>> JkMount /sw-builder/actionServlet ajp13
>>
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Tomcat 6 / Apache 2.2 integration problem (no images,
no css loaded)
Posted by Michael Clark <mi...@metaparadigm.com>.
Andreas Schneider wrote:
> [Wed Mar 19 14:57:27 2008] [error] [client 127.0.0.1] client denied by
> server configuration: E:/server/apache-tomcat-6.0/temp/0-sw-builder/ci.css,
> referer: http://localhost/sw-builder/login.jsp
>
>
You have denies for the subdirectories of the expanded war but you don't
have an associated allow on that directory.
> <Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder">
> Options Indexes FollowSymLinks
> DirectoryIndex index.html index.htm index.jsp
>
Try adding:
AllowOverride None
allow from all
> </Directory>
> # Deny direct access to WEB-INF and META-INF
> #
> <Location "/sw-builder/WEB-INF/*">
> AllowOverride None
> deny from all
> </Location>
>
> <Location "/sw-builder/META-INF/*">
> AllowOverride None
> deny from all
> </Location>
> #
> # Use Directory too. On Windows, Location doesn't work unless
> casematches
> #
> <Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder/WEB-INF/">
> AllowOverride None
> deny from all
> </Directory>
>
> <Directory "E:/server/apache-tomcat-6.0/temp/0-sw-builder/META-INF/">
> AllowOverride None
> deny from all
> </Directory>
>
> JkMount /sw-builder/*.jsp ajp13
> JkMount /sw-builder/*.jspx ajp13
> JkMount /sw-builder/student/actionServlet ajp13
> JkMount /sw-builder/actionServlet ajp13
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Tomcat 6 / Apache 2.2 integration problem (no images,
no css loaded)
Posted by Andreas Schneider <sc...@gmx.net>.
The other thing why the auto generated mod_jk.conf is using the
extracted webapp in the temp folder. If I would configure it by myself,
why I shouldn't use the folder in catalina_home/webapps/sw-builder?
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org