Results 1 to 2 of 2

Thread: apache to be used as proxy for tomcat applications

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default apache to be used as proxy for tomcat applications

    Hi,
    I am trying to use Apache as a front end to an application which runs on a
    Tomcat server.
    On lan I am able to correctly see it but from internet things are not working.
    I tried understanding mod_jk page but I was unable to get to the correct
    settings.
    following is the application I am trying to get up and running
    hxxps://confluence.sakaiproject.org/display/DOC/Sakai+2.7
    (the binary version of above page).

    apache vhost can be read here
    <VirtualHost *:80>


    ServerName research.openitup.in
    ProxyRequests off
    <Proxy *>
    Order deny,allow
    Allow from all
    </Proxy>

    ProxyPreserveHost Off

    ProxyPass /portal ajp://192.168.1.4:8009/portal
    ProxyPassReverse /portal ajp://192.168.1.4:8009/portal


    ProxyPass / hxxp://192.168.1.4/
    ProxyPassReverse / hxxp://192.168.1.4/

    </VirtualHost>
    On lan it is accessible
    hxxp://192.168.1.4:8080/portal
    perfectly but from internet I am not clear as what is wrong with it.
    To access it from internet you need to type
    hxxp://research.openitup.in/portal

    Here is a relevant page to doc
    hxxps://confluence.sakaiproject.org/display/~steve.swinsburg/Fronting+Tomcat+with+Apache+via+mod_proxy_ajp

    As per above doc I have done
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" URIEncoding="UTF-8" />
    and a file named sakai.properties has been changed
    serverUrl=hxxp://localhost:80
    The server which faces internet and the server where research.openitup.in are different machines but sakai.

    Sakai and research.openitup.in are running on same system
    so as the doc says
    to have
    ProxyPass / hxxp://192.168.1.4:8009/
    ProxyPassReverse / hxxp://192.168.1.4:8009/
    The same is not possible for me since root of my site
    research.openitup.in is itself proxied inside as

    ProxyPass / hxxp://192.168.1.4/
    ProxyPassReverse / hxxp://192.168.1.4/
    So can any one suggest any thing in this situation.

    Replace hxxp by http I was not able to post it because this is my first post on forum and I need to have 10 to post links.So replaced http by hxxp

  2. #2
    Junior Member
    Join Date
    Dec 2008
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    just try this on your vhost:


    Code:
    ProxyRequests off
    
    ProxyPass / ajp://192.168.0.4:8009/
    
    <Proxy ajp://192.168.0.4:8009/*>
                    Order deny,allow
                    Deny from none
                    Allow from all
    </Proxy>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Solved] Nginx Reverse Proxy Load Balance Configuration For Apache
    By raj in forum Web servers
    Replies: 4
    Last Post: 15th April 2010, 12:26 PM
  2. Want to implement reverse proxy with apache
    By kumarat9pm in forum Proxy Servers
    Replies: 2
    Last Post: 5th December 2009, 01:14 AM
  3. Reverse Proxy to Backend Tomcat Servers
    By Johnny Utah in forum Web servers
    Replies: 9
    Last Post: 11th November 2009, 11:06 AM
  4. Replies: 5
    Last Post: 11th September 2009, 10:15 AM
  5. mrtg apache tomcat
    By blackj in forum CentOS / RHEL / Fedora
    Replies: 1
    Last Post: 8th August 2008, 12:14 AM

Posting Permissions

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