This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. Hosting Liferay for Personal Use
Ever wish you could avoid paying $50/month for a Java host for your personal Liferay portal?
Here's how I replaced the $50/month associated with a Java host: I used my home computer and internet connection, and a PHP/Apache server. I put the attached proxy.php and .htaccess files on a hosted PHP/Apache server:
In the proxy.php file, there are references to an IP address, which is my home network's IP address. The mechanism works as follows:
The client makes a request to server, e.g. http://example.com/web/guest/home, then Apache HTTP server cannot find /web/guest/home document and based on .htaccess configuration invokes proxy.php file. Well, proxy.php just takes /web/guest/home along with request parameters, sends them to my home's Liferay server, takes the response along with headers, and sends them to the client.
Voila.
So how does it work?
The key part is the .htaccess file:
RewriteEngine On
RewriteBase /
DirectoryIndex index.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /proxy.php [L]
The source for the wonderful configuration above is as follows:
http://www.brainonfire.net/blog/apache-pitfall-errordocument-post/
With regard to the proxy.php script. I wrote that and I've tested it without any issue. There are some issues with document upload, etc. I hope to address these in the near future by replacing the proxy.php with a full-featured proxy.