Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
padmalaya pradhani
Liferay with Apache web Server
May 8, 2012 2:47 AM
Answer

padmalaya pradhani

Rank: New Member

Posts: 10

Join Date: March 15, 2012

Recent Posts

Hi

Can any one help me with simple steps of running liferay instance on apache web server.

I did follow the documentation available in wiki, however the same is not helpful.

Thanks in advance

Padmalaya
Subhasis Roy
RE: Liferay with Apache web Server
May 8, 2012 2:59 AM
Answer

Subhasis Roy

Rank: Expert

Posts: 284

Join Date: January 19, 2012

Recent Posts

hi,

please try the following

http://etapix.com/2011/06/14/tomcat-6-0-26-liferay-6-and-apache-web-server-setup/
padmalaya pradhani
RE: Liferay with Apache web Server
May 8, 2012 3:26 AM
Answer

padmalaya pradhani

Rank: New Member

Posts: 10

Join Date: March 15, 2012

Recent Posts

Hi Subhasis ,

Thanks for the link!!

I could see I need to make changes in server.xml of Tomcat server and add the following lines

 1<Listener className=”org.apache.jk.config.ApacheConfig”
 2forwardAll=”false”
 3noRoot=”false”
 4modJk=”/usr/lib/apache2/modules/mod_jk.so”
 5configHome=”/etc/apache2″
 6jkConfig=”/etc/apache2/conf/mod_jk.conf”
 7jkWorker=”localtomcat”
 8jkLog=”/var/log/apache2/mod_jk.log”
 9jkDebug=”debug”
10workerConfig=”/etc/apache2/workers.properties”/>


But on including the same I get the below error:

1WARNING: Catalina.start using conf/server.xml:
2com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
3
4
5    at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:684)
6    at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:554)



Please help me fix this .

Thanks in advance

Padmalaya
Ravi Kumar Gupta
RE: Liferay with Apache web Server
May 8, 2012 3:50 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1303

Join Date: June 23, 2009

Recent Posts

If I wanted apache in front of liferay, I would be following just two steps. And none of those is on liferay server.
1. Enable mod_proxy, mod_proxy_http
2. Add conf for

<IfModule proxy_module>
<IfModule proxy_http_module>

#
# Reverse Proxy
#
ProxyRequests Off
ProxyPreserveHost Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://rkg.test:8080/
ProxyPassReverse / http://rkg.test:8080/
</IfModule>
</IfModule>

HTH
Subhasis Roy
RE: Liferay with Apache web Server
May 8, 2012 4:30 AM
Answer

Subhasis Roy

Rank: Expert

Posts: 284

Join Date: January 19, 2012

Recent Posts

padmalaya pradhani:


But on including the same I get the below error:

1WARNING: Catalina.start using conf/server.xml:
2com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
3
4    at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:684)
5    at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:554)





The Exception occurs when there is some special UTF-8 characters inside a XML file, and SAX’s parser is not configure to parse the UTF-8 properly. I guess there is some special characters in your xml file. Can you please do one thing.

Try to put the double quotes again. I mean to say

forwardAll=”false” --> In this line delete the quote and then again put the quote using key board. Don't copy and paste it from the example I have given.
David H Nebinger
RE: Liferay with Apache web Server
May 8, 2012 5:10 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11770

Join Date: September 1, 2006

Recent Posts

Ravi Kumar Gupta:
If I wanted apache in front of liferay, I would be following just two steps. And none of those is on liferay server.
1. Enable mod_proxy, mod_proxy_http
2. Add conf for


Then you would totally be missing out on the advantages of Apache, including serving static files.

My favorite apache + tomcat reference is here: https://www.dnebinger.com/wiki/-/wiki/Setup+and+Configuration/Fronting+Liferay+Tomcat+with+Apache+HTTPd+daemon
Hitoshi Ozawa
RE: Liferay with Apache web Server
May 8, 2012 7:01 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Ravi's right. You don't need to edit tomcat server's server.xml file.
You probably added BOM to your xml file.
Ravi Kumar Gupta
RE: Liferay with Apache web Server
May 8, 2012 10:07 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1303

Join Date: June 23, 2009

Recent Posts

David, I will try the links shared by you as well. emoticon
Jitendra Pant
RE: Liferay with Apache web Server
February 6, 2013 2:07 AM
Answer

Jitendra Pant

Rank: New Member

Posts: 2

Join Date: January 31, 2013

Recent Posts

David H Nebinger:
Ravi Kumar Gupta:
If I wanted apache in front of liferay, I would be following just two steps. And none of those is on liferay server.
1. Enable mod_proxy, mod_proxy_http
2. Add conf for


Then you would totally be missing out on the advantages of Apache, including serving static files.

My favorite apache + tomcat reference is here: https://www.dnebinger.com/wiki/-/wiki/Setup+and+Configuration/Fronting+Liferay+Tomcat+with+Apache+HTTPd+daemon


The link is not working, can you share me some other link where you described it
Andrea Pravato
RE: Liferay with Apache web Server
May 1, 2013 2:56 AM
Answer

Andrea Pravato

Rank: New Member

Posts: 3

Join Date: May 1, 2013

Recent Posts

I have re-found that, searching in google the title of the article: http://www.liferay.com/web/26526/blog/-/blogs/fronting-liferay-tomcat-with-apache-httpd-daemon
David H Nebinger
RE: Liferay with Apache web Server
May 1, 2013 5:27 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11770

Join Date: September 1, 2006

Recent Posts

I reposted it on Liferay.com as a blog entry here: http://www.liferay.com/web/26526/blog/-/blogs/fronting-liferay-tomcat-with-apache-httpd-daemon