November 10, 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

liferay-how-to-configure-ssl-and-https-img01

 

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.

liferay-how-to-configure-ssl-and-https-img02

liferay-how-to-configure-ssl-and-https-img03

Related posts

2 Comments

  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.
    Antonio.

    Reply

Leave a Reply

Your email address will not be published.