Hi,
Today Im going to explain you how to secure your site in Liferay6.1 (HTTPS enabled)
Apache – Liferay Integration
- Integrating Liferay and Apache should be a cake walk if you follow this blog Connect-Sam.com unless you wish not to move static content from Liferay to Apache which in my case was true.
- Create two files named server.key and server.cer from the given certificate (or create a self signed certificate) using openssl tool and place them in {APACHE_HOME}\conf\ directory.
{APACHE_HOME} = “D:/Apache2.2/” in my case
Reference : http://sycure.wordpress.com/2008/05/15/tips-using-openssl-to-extract-private-key-pem-file-from-pfx-personal-information-exchange/ - Add the following configuration to ssl.conf or httpd-ssl.conf (whichever present) in {APACHE_HOME}\conf\extra directory
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 </IfModule> 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!!.
Advertisements