This forum is no longer active. Please post your questions to our new community site

Forums Liferay

change port and url

Subscribe to change port and url 13 post(s), 3 voice(s)

 
Avatar tachion2k 5 post(s)

Hi,

I’ve installed Liferay and it’s working, but I would like to change the port from 8080 to 80 and the URL so that I don’t have to type /liferay at the end. How would I do this?

Thank you

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

If you want to change the tomcat port during the installation to 80, yo need to install as root on Linux or OS X. By default tomcat is installed at 8080. Only if the port is not occupied, you can change it during the installation. In addition to this, you can launch the installer with —tomcat_server_port=80 option provided you are the root user on an Unix systems

If you want to change it once installed, you have to replace

<connector port="8080">

with

<connector port="80">

into the apache-tomcat/conf/server.xml file.

To remove /liferay at the end of the URL you can follow these steps:

1. Remove apache-tomcat/webapps/ROOT folder and rename apache-tomcat/webapps/liferay to apache-tomcat/webapps/ROOT

2. Replace

<context docbase="liferay" crosscontext="true" path="/liferay">

with

<context docbase="ROOT" crosscontext="true" path="/">

into apache-tomcat/webapps/ROOT/META-INF/context.xml

Finally you have to modify apache-tomcat/webapps/ROOT/WEB-INF/classes/portal-ext.properties and replace:

portal.ctx=/liferay

with

portal.ctx=/

I hope it helps, post if you have any problem.

Kind regards

 
Avatar tachion2k 5 post(s)

Thanks for the quick reply. I have made the changes and restarted the server. The port looks like it’s working, but now I get this message:

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.ArrayIndexOutOfBoundsException: 0 com.liferay.portal.util.PortalInstances._getDefaultCompanyId(PortalInstances.java:215) com.liferay.portal.util.PortalInstances._getCompanyId(PortalInstances.java:169) com.liferay.portal.util.PortalInstances.getCompanyId(PortalInstances.java:79) com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:107) com.liferay.portal.servlet.filters.sessionid.SessionIdFilter.doFilter(SessionIdFilter.java:85)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.


Apache Tomcat/5.5.25

Thanks

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Can you post the apache-tomcat/logs/catalina.out file or send to beltran@bitnami.com?

 
Avatar tachion2k 5 post(s)

I just emailed the file to you.

Thanks

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

I updated the post, I forgot to change the path into the apache-tomcat/webapps/ROOT/META-INF/context.xml file.

I hope it helps.

 
Avatar gineta 7 post(s)

Hi I install many times , Liferay BUt now in one server I get also
java.lang.ArrayIndexOutOfBoundsException: 0 com.liferay.portal.util.PortalInstances._getDefaultCompanyId(PortalInstances.java:233) com.liferay.portal.util.PortalInstances._getCompanyId(PortalInstances.java:189) com.liferay.portal.util.PortalInstances.getCompanyId(PortalInstances.java:71) com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:110) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:74) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)

ANy idea how solve this . Please post the solution
Thanks

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

It seems that the Java memory is not enough. Try to edit the following line in apache-tomcat/scripts/ctl.sh file:

export JAVA_OPTS=”-XX:MaxPermSize=512m -Xms256m -Xmx512m”

You can replace MaxPermSize=512m with MaxPermSize=1024.

Cheers

 
Avatar gineta 7 post(s)

This not make changes
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.ArrayIndexOutOfBoundsException: 0 com.liferay.portal.util.PortalInstances._getDefaultCompanyId(PortalInstances.java:233) com.liferay.portal.util.PortalInstances._getCompanyId(PortalInstances.java:189) com.liferay.portal.util.PortalInstances.getCompanyId(PortalInstances.java:71) com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:110) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:132) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:74) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)

I go to ADD 2 GB ram And I updtate you .
but look it
regards

 
Avatar gineta 7 post(s)

Now the server have 3 Gb ram and change the memory also not make any solutions
Any idea about this Bug ?

thanks in advance

 
Avatar gineta 7 post(s)

2:37:07,162 ERROR [[/liferay]:676] StandardWrapper.Throwable
java.lang.ExceptionInInitializerError

22:37:07,164 ERROR [[/liferay]:3958] Servlet /liferay threw load() exce$
org.portletbridge.portlet.GUIDException: error – failure to instantiate$

 
Avatar gineta 7 post(s)

SOLUTION to THe problem

I test with more memory and with clean installations

At the end . The error you get always when you install liferay Bitnami in Centos 5.2—x86_ 64 bits

This installer work perfect with any other centos But never in Centos 5.2—64 bits

:(

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi Gineta,

Yes, you need the compat libraries to run BitNami applicaitons on 64 bits systems. Have you tray to install them? Take a look this post https://bitnami.com/forums/forums/1/topics/753

Forums Liferay