Enable HTTPS on Liferay/Apache

Today Im going to explain you how to secure your site in Liferay6.1 (HTTPS enabled)
Apache – Liferay Integration

SSLCertificateFile "D:/Apache2.2/conf/server.cer"
SSLCertificateKeyFile "D:/Apache2.2/conf/server.key"
  • We created necessary certificates for apache web server, now add the following configuration at the bottom of {APACHE_HOME}\conf\httpd.conf file.
Include conf/ssl.conf

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

RewriteEngine On

RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

ProxyRequests On
ProxyPreserveHost On
ProxyPass / http://myliferay.com:8080/
ProxyPassReverse / http://myliferay.com:8080/

Note : Include all modules realted to Rewrite and Proxy in httpd.conf file

  • You ar done, just restart the Apache web server now!!.