Find the answer to your Linux question:
Results 1 to 4 of 4
Hello! I am new to linuxforums.org and this is my first post. I am trying to redirect Apache to tomcat through mod_proxy_ajp i have configured httpd.conf file as follows: ProxyPass ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    3

    Question Error while redirecting Apache to tomcat


    Hello! I am new to linuxforums.org and this is my first post.
    I am trying to redirect Apache to tomcat through mod_proxy_ajp
    i have configured httpd.conf file as follows:
    ProxyPass / ajp://localhost:8009/CypherLogics/
    ProxyPassReverse / ajp://localhost:8009/CypherLogics/

    i am getting the login page of webapplication ,but after entering credentials ,it shows following error:

    HTTP Status 404 - /CypherLogics/CypherLogics/SiteChannelsServlet;jsessionid=462661AE4622E731CF8 47D8CB90A4C13

    type Status report

    message /CypherLogics/CypherLogics/SiteChannelsServlet;jsessionid=462661AE4622E731CF8 47D8CB90A4C13

    description The requested resource is not available.



    The application works fine on tomcat.

    I have checked log file in Apache it gives following error:

    [client 192.168.1.36] Directory index forbidden by Options directive: /var/www/html/
    [Tue Mar 12 00:57:13 2013] [notice] caught SIGTERM, shutting down
    [Tue Mar 12 00:57:13 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Tue Mar 12 00:57:13 2013] [notice] Digest: generating secret for digest authentication ...
    [Tue Mar 12 00:57:13 2013] [notice] Digest: done
    [Tue Mar 12 00:57:13 2013] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations
    [Tue Mar 12 01:00:06 2013] [notice] caught SIGTERM, shutting down

    I have tried many things ,read a lot tutorials but couldn't find the solution.
    Thank you..

  2. #2
    Linux Newbie nplusplus's Avatar
    Join Date
    Apr 2010
    Location
    Charlotte, NC, USA
    Posts
    106
    1) I think the SIGTERM message is misleading, particularly if Apache is still running without you shutting it down.

    2) It looks like the application directory tomcat is forwarding you to after login is configured to insert "CypherLogics/" in the path. You might check your Tomcat configuration. Of course, maybe removing the trailing / in your apache "proxypass..." statements would work. Its been awhile, but I vaguely remember having some issues based on the path received by apache in the client request and the path called by apache during the proxy event.

    3) To expand on the above, you might setup two proxy contexts. One that passes to ...servername:8009/ (root) for client requests from /, and another that passes to ...servername:8009/CypherLogics/ if the client requests from the path CypherLogics/.
    N

  3. #3
    Just Joined!
    Join Date
    Mar 2013
    Posts
    3
    Quote Originally Posted by nplusplus View Post
    1) I think the SIGTERM message is misleading, particularly if Apache is still running without you shutting it down.

    2) It looks like the application directory tomcat is forwarding you to after login is configured to insert "CypherLogics/" in the path. You might check your Tomcat configuration. Of course, maybe removing the trailing / in your apache "proxypass..." statements would work. Its been awhile, but I vaguely remember having some issues based on the path received by apache in the client request and the path called by apache during the proxy event.

    3) To expand on the above, you might setup two proxy contexts. One that passes to ...servername:8009/ (root) for client requests from /, and another that passes to ...servername:8009/CypherLogics/ if the client requests from the path CypherLogics/.
    N
    1.I tried creating two contexts ,but while restarting httpd service it says "already worker is using the file " .

    2.I removed the / at the end but it too didn't work.

    3.I tried redirecting another webapp using same method ,it also has login,but it works fine.

    4.The difference i found out is that while redirect CypherLogics webapp,i am getting following url:

    //cypherlogics.com/CypherLogics/SiteChannelsServlet;jsessionid=462661AE4622E731CF8[/url] 47D8CB90A4C13

    And on redirecting other app
    //cypherlogics.com:8080/otherapp/SiteChannelsServlet;jsessionid=462661AE4622E731CF8[/url] 47D8CB90A4C13

    The CypherLogics not connecting to 8080 port on redirecting.


    Please let me which is the best way to redirect apache to tomcat, i mean the best other alternative for redirecting.

  4. #4
    Just Joined!
    Join Date
    Mar 2013
    Posts
    3
    Quote Originally Posted by adi_4004 View Post
    1.I tried creating two contexts ,but while restarting httpd service it says "already worker is using the file " .

    2.I removed the / at the end but it too didn't work.

    3.I tried redirecting another webapp using same method ,it also has login,but it works fine.

    4.The difference i found out is that while redirect CypherLogics webapp,i am getting following url:

    //cypherlogics.com/CypherLogics/SiteChannelsServlet;jsessionid=462661AE4622E731CF8[/url] 47D8CB90A4C13

    And on redirecting other app
    //cypherlogics.com:8080/otherapp/SiteChannelsServlet;jsessionid=462661AE4622E731CF8[/url] 47D8CB90A4C13

    The CypherLogics not connecting to 8080 port on redirecting.


    Please let me which is the best way to redirect apache to tomcat, i mean the best other alternative for redirecting.
    Yes!!! i fixed it

    I used virtual host with redirect permanent code ,as i am new user i dont have rights for posting urls so i am unable to provide code here,if anyone have the same problem please mail me at : adi_4004@rediff.com
    Thank you...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •