#1  
Old 20th June 2008, 12:49
ripit ripit is offline
Junior Member
 
Join Date: Nov 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache tomcat jsf php

Hi

I've installed apache and tomcat with mod_jk and now I wonder how to get it to work with index.php files.

I have jsf applications up and running on the server and I also got php applications to work but it won't work if I don't type index.php.

This is my JKMount config in httpd.conf.

Code:
JkUnMount /*.php worker1
JkUnMount /*.html worker1
JkUnMount /*.jpg worker1

JkMount /* worker1
JkMount /*/servlet/* worker1
JkMount /*.war worker1
and here is my workers.properties:

Code:
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
I had to do JkMount /* to get jsf to work. is there any other way to configure this:

/ripit
Reply With Quote
Sponsored Links
  #2  
Old 21st June 2008, 11:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

So PHP files are working except for index.php?
Any errors in Apache's error log? Any errors in your browser when you call index.php?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 22nd June 2008, 00:47
ripit ripit is offline
Junior Member
 
Join Date: Nov 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No everything in php works fine if i type:

www.test.com/index.php

but not if I type:

www.test.com

when I type the latter i shows the php code for index.php. This I can stop.

This is of course because tomcat can't parse php, but is there a way to stop apache to call tomcat. Can apache in someway find out what filetype it is before it passes it forward to tomcat.

I wan't the JkMount /* because otherwise jsf won't work.

/ripit
Reply With Quote
  #4  
Old 22nd June 2008, 11:51
ripit ripit is offline
Junior Member
 
Join Date: Nov 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found JkOptions ForwardDirectories but I can't figure out how to get it to work. If I understand it correct everything that apache don't recognize or if an index file doesn't exist then it is forwarded to tomcat.
This would solve my problem whit jsf. So any help in how to get it to work is appreciated.

/ripit
Reply With Quote
  #5  
Old 24th June 2008, 01:55
ripit ripit is offline
Junior Member
 
Join Date: Nov 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Hi again

I think I solved it but not with JkOptions ForwardDirectories because I didn't know how.

I do:

Code:
DirectoryIndex index.html index.php *.jsp
and then i forward all jsp to tomcat with this:

Code:
JkMount /*.jsp worker1
and then I have to stop access to WEB-INF directory like this:

Code:
<Directory ~ "/WEB-INF" >
    AllowOverride None
    Deny from all
</Directory>
This seems to solve my problems with JSF.

If anyone got any other suggestions or know about any security issues with this solution I would be glad to know about them.

Thanks in advance

/ripit
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 18:26
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 10:29
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 11:20
network issues now it says "401 The web site is blocked by administrator" Check General 3 26th February 2008 15:22
Apache2 Freezes celtic Server Operation 31 28th May 2007 18:18


All times are GMT +2. The time now is 17:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.