-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul,
On 7/22/16 4:24 PM, Paul Roubekas wrote: > On 7/22/2016 4:14 PM, Christopher Schultz wrote: >> You can even use either HTTP or AJP as the protocol to connect >> httpd -> Tomcat. I would recommend mod_proxy_http just because >> it's basically the simplest to configure. If you want to use TLS >> and get the certificate information over to Tomcat/TomEE, it's a >> bit easier to do with AJP, but not impossible with HTTP. >> > I have pages that require HTTPS. That's not a problem. Use httpd to terminate TLS (that is, use mod_ssl for TLS and configure the server without regard to TomEE) and then use mod_proxy to connect httpd to TomEE. You can use an http:// URL or an https:// URL between httpd and TomEE and it will use the protocol you specify. If you need the "external" TLS information (e.g. client's certificate, client's exact protocol e.g. TLSv1.1, client's TLS cipher, etc.) then you'll need to forward that information using HTTP headers through to TomEE. If you don't need that stuff on the TomEE server, then don't worry about it. >> httpd + Tomcat/TomEE is quite easy to get set up with >> mod_proxy_http. Simply: >> >> 1. Configure Tomcat/TomEE as usual, with an HTTP connector >> listening on some port (probably 8080 is already being used if >> you have the default configuration). >> >> 2. Enable mod_proxy and mod_proxy_ajp in httpd. You may also >> want mod_proxy_balancer if you have multiple Tomcat/TomEE nodes >> you want to use for load-balancing. > > Only one server. No load balancing at this time. Okay. If you decide to expand to more than one TomEE node, the configuration only changes a little bit. >> 3. Configure a <Proxy> directive in your httpd configuration >> that looks something like this: >> >> ProxyPass /webappname/ http://tomcathost:8080/webappname/ >> ProxyPassReverse /webappname/ http://tomcathost:8080/webappname/ > I have a requirement that when a user enters /http://www.myhost.com > they get the TomEE website. That is why my configuration is as > below. > > ProxyPass / ... ProxyPassReverse / ... If you try to re-name the "context" (that's the technical term for the "web application") path between httpd and TomEE, you'll spend a great deal of time trying to patch-up all kinds of little things. It would be best to deploy your web application as the "ROOT" context: just change the name of the WAR file from webappname.war to ROOT.war (caps are important, even on a case-insensitive filesystem) (or re-name the deployment directory from webappname to ROOT if you don't have a WAR file). This will make your httpd configuration look like this: ProxyPass / http://tomeehost:8080/ ProxyPassReverse / http://tomeehost:8080/ Another option would be to redirect from / to /webappname/ and use: ProxyPass /webappname/ http://tomeehost:8080/webappname/ ProxyPassReverse /webappname/ http://tomeehost:8080/webappname/ I don't like to use / and ROOT for a number of reasons, but it CAN work. Hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAleTkT8ACgkQ9CaO5/Lv0PD05QCfcHq9telhv0jiCFuK/EJkoVVk /GsAn08ksjAT4x0j68zRcTjUaMKPNMQa =aER0 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org