May 18, 2024

How to configure SSL and HTTPS in Liferay

Let’s see how to enable the HTTPS access to Liferay portal. Firstly we need an SSL certificate that ensures the sending and receiving encrypted information. In this example we use the keytool line command to generate a “self-signed” certificate.


STEP 1. Generate the Tomcat server SSL key

$ cd /home/giuseppe/apps/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/keyfiles

$ keytool -genkey -alias tomcatkey -keyalg RSA -keystore ./liferay_keystore



STEP 2. Configure the Tomcat server for SSL

$ vi  /home/giuseppe/apps/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/conf/server.xml


<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
	       keystoreFile="/home/giuseppe/apps/liferay/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/keyfiles/liferay_keystore" keystorePass="123456"/>

Start Tomcat. If no errors occur, you can see the following log message.



Related posts


  1. Antonio Musarra

    Ciao Giuseppe.
    Recentemente ho pubblicato un mini eBook sul mio account Slide Share che tratta proprio il tema trattato dal tuo articolo. La versione di riferimento è la 7.1 CE e comprende sia la versione con il bundle Tomcat sia la versione con il bundle JBoss.

    A presto.


Leave a Reply

Your email address will not be published.