Re: [users@httpd] configuring apache and tomcat via mod_jk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/8/06, jbashir <joseph@xxxxxxxxxxxx> wrote:

I think I could not communicate my problem in a right way.
What actually happens is, Apache runs first and then it serve the requests
for tomcat and the tomcat displays pages. What I want is, to run tomcat
first (by default) and then send requests from tomcat to apache to display
php pages. This I can do by writing the following in the mod_jk.conf file:

This is rather non standard installation and I'm not sure that it's
possible to do. Ususally Apache is the frontend and Tomcat is the
backend. It gives you better performance, security and manageability.


 #################### localhost:/ ####################

    # Static files
    Alias / "D:/TestApp/TestApp/www"

    <Directory "D:/TestApp/www">
        Options Indexes FollowSymLinks
        DirectoryIndex index.do
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "//WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "//META-INF/*">
        AllowOverride None
        deny from all
    </Location>
    #
    # Use Directory too. On Windows, Location doesn't work unless case
matches
    #
    <Directory "D:/TestApp/www/WEB-INF/">
        AllowOverride None
        deny from all
    </Directory>

    <Directory "D:/TestApp/www/META-INF/">
        AllowOverride None
        deny from all
    </Directory>

    JkMount //servlet/AxisServlet  ajp13
    JkMount //servlet/AdminServlet  ajp13
    JkMount //*.xml  ajp13
    JkMount //*.jspx  ajp13
    JkMount //*.do  ajp13
    JkMount //services/*  ajp13
    JkMount //*.jsp  ajp13

writing http://192.168.0.21/ displays the index.jsp page. Thats what I want.
But the problem is that it then does not display the .php files. Once it is
switched to tomcat, it does not go back to apache. Thanks.

Of course it doesn't. What its the URL for you PHP pages. You have to
keep them separate from you JkMounts and let Apache handle them. Just
think about Apache as a aswitch that routes requests for different
content to different handles.




Serge Dubrouski wrote:
>
> On 9/8/06, jbashir <joseph@xxxxxxxxxxxx> wrote:
>>
>> Configuring apache and tomcat via mod_jk is done by installing apache on
>> port
>> 80 and tomcat on port 8080, and when we write http://localhost/ it's
>> apache
>> server which runs by default (being installed on port 80), and then
>> through
>> mod_jk.conf file we instruct the server when to switch to tomcat.
>>
>> But I have my settings opposite to it. I have tomcat on port 80 and
>> apache
>> on port 8080. So when I write http://localhost/, it's tomcat which runs
>> first (thats what my application demands), and then on choice I want to
>> run
>> php module. Is it possible to do that and how? What changes I will have
>> to
>> make in mod_jk.conf and httpd.conf ? Any suggestions? I am using Apache
>> 1.3.37 and Tomcat 5.0.28.
>>
>> Thanks
>
> So you weren't able to put them on separate boxes?
> Ok, to change port in Tomcat look for <Connector ...> tar in server
> .xml and change pro there. To chanhge port in Apache look for Listen
> in httpd.conf and change port there.
>
> ---------------------------------------------------------------------
> 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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>
>

--
View this message in context: http://www.nabble.com/configuring-apache-and-tomcat-via-mod_jk-tf2237947.html#a6210057
Sent from the Apache HTTP Server - Users forum at Nabble.com.


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux