• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to forward the requests from webserver to tomcat with out context root

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

How can I forward the request hitting webserver directly to AppServer?

My Environment Details:
webserver: Apache 2.4
Appserver: Tomcat 7.0
java: 1.6

My current URL ex: https://Webservername/App1
Current settings:

ProxyPass /App1 https://Appservername:8443/App1
ProxyPassReverse /App1 https://Appservername:8443/App1

i want the URL to be https://Webservername and that should redirect to the App1.

 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ProxyPass / https://Appservername:8443/App1
ProxyPassReverse / https://Appservername:8443/App1

Note, however, that you should do this in a VirtualHost. Otherwise, the entire Apache webserver will route to Tomcat!
 
Sam Anchor
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried giving / but it didnt work. Here are my Virtual Host config

<VirtualHost _default_:443>

# General setup for the virtual host
DocumentRoot "D:/WebServer/htdocs"
ServerName webserver name
ServerAdmin admin@example.com (kept it default)
ErrorLog "D:/WebServer/logs/error.log"
TransferLog "D:/WebServer/logs/access.log"

And I just have index.html undet htdocs folder
 
Tim Holloway
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the reason I warned about using VirtualHost was because it routes everything to Tomcat whether you want it to or not. Using "default" as the VirtualHost does exactly the same thing.

What I was referring to was something more like this:



A couple of things to note are:

1. The SSL channel is strictly from the Internet to the Apache Server. The mod_proxy channel is unencrypted. I believe that if you really need SSL within your network, that you'd need to use mod_jk. In any event, of course, encryption over the loopback (localhost) is pointless, since there's no way to intercept that.

2. I didn't include the directives that enable mod_proxy or the SSL mechanisms. They're left as an excercise to the reader.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic