Friday, October 10, 2014

[Liferay] [Apache] Setting up Apache as web server in front of Liferay using mod_proxy


Setting Apache as web server for Liferay front is so easy. Thanks Alpesh Sir ji for help.

Once Apache is installed, open httpd.conf and add the lines like below-
NameVirtualHost *:80
<VirtualHost *:80>
ServerName liferay62.local
ProxyPass / http://localhost:4000/
ProxyPassReverse / http://localhost:4000/
ProxyPreserveHost On
</VirtualHost>
<VirtualHost *:80>
ServerName liferay61.local
ProxyPreserveHost On
ProxyPass / http://localhost:3128/
ProxyPassReverse / http://localhost:3128/
</VirtualHost>
view raw httpd.conf hosted with ❤ by GitHub


Make sure you enable mod_proxy and mod_proxy_http before starting apache.
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
view raw httpd.conf hosted with ❤ by GitHub
Piece of cake. Isn't it?

Until next time.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.