Page 1 of 1
Tomcat and HTTPS
Posted: Mon Dec 24, 2012 1:25 am
by 22dec1960
Hi,
I changed server from jetty to tomcat following the
http://docs.broadleafcommerce.org/current/Tomcat.html tutorial.
It is OK for using HTTP but not OK for HTTPS. Therefore, I cannot login or register into the site.
Any suggestion for HTTPS configuration for tomcat.
Re: Tomcat and HTTPS
Posted: Mon Dec 24, 2012 5:56 am
by denis
Hi,
You have to edit your "server.xml" file and enable HTTPS connector :
Code: Select all
<Connector
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="path/to/broadleaf/keystore/file" keystorePass="Password"
clientAuth="false" sslProtocol="TLS"/>
Re: Tomcat and HTTPS
Posted: Tue Dec 25, 2012 10:01 pm
by 22dec1960
Thanks denis,
But I am using maven plugin for tomcat. Is that same?
Re: Tomcat and HTTPS
Posted: Wed Dec 26, 2012 7:10 am
by denis
Oh ok sorry, so you have to check that you have https connector between <connectors></connectors> (take a look at the jetty configuration into pom.xml)
Re: Tomcat and HTTPS
Posted: Fri Dec 28, 2012 6:00 pm
by vinodmaladkar
Hello '22dec1960' and 'denis'
First I changed the size for WAR to deploy my site application on Tomcat7.0.4
In pom.xml for jetty I see below info...
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>${httpPort}</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
<connector implementation="org.eclipse.jetty.server.ssl.SslSelectChannelConnector"> <port>${httpsPort}</port>
<keystore>${webappDirectory}/WEB-INF/blc-example.keystore</keystore>
<keyPassword>broadleaf</keyPassword>
<password>broadleaf</password>
</connector>
</connectors>
What is similar configuration for tomcat for 6.0 which comes with Broadleaf? OR on tomcat 7?
Anyone tried this running on tomcat successfully?
Re: Tomcat and HTTPS
Posted: Wed Jan 02, 2013 12:59 pm
by phillipuniverse
You will have to follow the instructions on this page:
http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html
Re: Tomcat and HTTPS
Posted: Thu Mar 21, 2013 11:28 am
by pam
Hi vinodmaladkar, phillipuniverse
I am facing the same issue. Do you have any suggestions on fixing this issue.
Updated site/pom.xml with these lines of code. But was not helpful.
Code: Select all
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<!-- for Tomcat 7, change to tomcat7-maven-plugin -->
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<path>/catalog</path>
<warSourceDirectory>${webappDirectory}</warSourceDirectory>
<port>8080</port>
<connector port="${httpsPort}" protocol="HTTP/1.1" SSLEnabled="true"
keystoreFile="${webappDirectory}/WEB-INF/blc-example.keystore"
keystorePass="broadleaf" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"/>
</configuration>
</plugin>
Look forward for your response.
~ Thank you
Re: Tomcat and HTTPS
Posted: Fri Jun 20, 2014 6:28 am
by abhilash.ghosh
pam wrote:Hi vinodmaladkar, phillipuniverse
I am facing the same issue. Do you have any suggestions on fixing this issue.
Updated site/pom.xml with these lines of code. But was not helpful.
Code: Select all
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<!-- for Tomcat 7, change to tomcat7-maven-plugin -->
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<path>/catalog</path>
<warSourceDirectory>${webappDirectory}</warSourceDirectory>
<port>8080</port>
<connector port="${httpsPort}" protocol="HTTP/1.1" SSLEnabled="true"
keystoreFile="${webappDirectory}/WEB-INF/blc-example.keystore"
keystorePass="broadleaf" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"/>
</configuration>
</plugin>
Look forward for your response.
~ Thank you
Use the below mentioned configuration in site/pom.xml to activate SSL in tomcat:
Code: Select all
<configuration>
<warSourceDirectory>${webappDirectory}</warSourceDirectory>
<path>/</path>
<port>${httpPort}</port>
<stopPort>9966</stopPort>
<stopKey>foo</stopKey>
<httpsPort>${httpsPort}</httpsPort>
<keystoreFile>${webappDirectory}/WEB-INF/blc-example.keystore</keystoreFile>
<keystorePass>broadleaf</keystorePass>
<password>broadleaf</password>
</configuration>
Run the ant build script. It should work.