it would be awesome if you could make a wiki page out of this... -igor
On Wed, Jul 6, 2011 at 8:47 AM, vp143 <[email protected]> wrote: > All, > > I think I have this resolved, at least no problems so far. > > There were many things that I needed to add: > 1) Within server.xml, I added proxyName and proxyPort to the 8080 connector. > I found this in the Tomcat documentation "When you are running behind a > proxy server (or a web server that is configured to behave like a proxy > server), you will sometimes prefer to manage the values returned by these > calls. In particular, you will generally want the port number to reflect > that specified in the original request, not the one on which the Connector > itself is listening. You can use the proxyName and proxyPort attributes on > the <Connector> element to configure these values." > > I also added a NEW connector at 8443 for https support. I found that > request.getScheme and similar code was returning incorrect values. To solve > this, this connector should have the value scheme="https". > > Here are the new connectors: > > <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}" > connectionTimeout="20000" proxyName="myserver.com" proxyPort="80"/> > > <Connector protocol="HTTP/1.1" port="8443" address="${jboss.bind.address}" > connectionTimeout="20000" proxyName="myserver.com" proxyPort="443" > scheme="https" /> > > 2) A mistake I made was putting myserver.com within the ProxyPass and > ProxyPassReverse. This was a mistake because this address was not valid for > port 8080 as my firewall was blocking it. My firewall only allows 80 and > 443. I change these values to localhost. Additionally, the VirtualHost for > 443 should point to 8443- the new connector created above. > > Additionally, the myapp is removed entirely (see the next point for the > reasons). > > The httpd.conf I have now is as follows: > > NameVirtualHost *:80 > <VirtualHost *:80> > ServerName myserver.com:80 > > ProxyPreserveHost On > ProxyPass / http://localhost:8080/ > ProxyPassReverse / http://localhost:8080/ > </VirtualHost> > > NameVirtualHost *:443 > <VirtualHost *:443> > ServerName myserver.com:443 > > SSLEngine On > SSLCertificateKeyFile /etc/ssl/private/server.key > SSLCertificateFile /etc/ssl/certs/server.crt > > ProxyPass / http://localhost:8443/ > ProxyPassReverse / http://localhost:8443/ > > #Cookie stuff- untested for now > ProxyPreserveHost On > ProxyPassReverseCookiePath / / > </VirtualHost> > > 3) Finally, my war file that I deploy needs to be called ROOT.war. From the > Jboss documentation "The only special case to this naming special name ROOT. > To deploy an application under the root context, you simply name it > ROOT.war. JBoss already contains a ROOT.war web application in the > jbossweb.sar directory. You will need to remove or rename that one to create > your own root application." Renaming it ROOT removes the myapp in the url > within wicket. > > I hope this helps any one else trying to setup in a similar way. As I first > thought, it wasnt anything in wicket. Thank you all for your help. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Configure-http-and-https-with-apache-and-jboss-tp3633546p3649180.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
