How to change Hybris server port

The default port is http://localhost:9001 .

How to start the hybris platform using a different port?

+4
source share
6 answers

Create the /config/local.properties file with this content:

 tomcat.http.port=9101 tomcat.ssl.port=9102 tomcat.ajp.port=8109 tomcat.jmx.port=9103 tomcat.jmx.server.port=9104 

You will then get a Hybris server to run at http://localhost:9101 .

+7
source

Modify the {HYBRIS_ROOT_DIR} /config/local.properties file and use the following properties to configure the various ports:

 tomcat.http.port=9001 tomcat.ssl.port=9002 tomcat.ajp.port=8009 tomcat.jmx.port=9003 tomcat.jmx.server.port=9004 

You can find the full configuration link on the Hybris wiki here: https://wiki.hybris.com/display/release5/Configuration+Properties+Reference

For the changes to be applied, you must run ant and restart Hybris.

You can run ant all , but if you just changed the configuration, you can deploy these changes without recompiling with ant deploy which is much faster.

+10
source

If you changed the port, make sure that you have updated spring security port-mapping (it should already use the configuration service and these properties via spring EL in order to do this if you use the latest version of hybrids), and for local development - URL resolution site ( website.<x>.http(s) , media.<x>.http(s) ) and the URL of the CMS website URL that displays regular expressions (ImpEx or hMC). I also think this property is for jvdbc.

You can change them in config/local.properties , platform/project.properties or the custom extension project.properties . The local.properties file has the highest priority (if the property is defined in several places), then the user extension project.properties and, finally, on the project.properties platform.

+1
source

You can also use this.

 hybris.instance.id=60 tomcat.http.port=9${hybris.instance.id}1 tomcat.ssl.port=9${hybris.instance.id}2 tomcat.jmx.port=9${hybris.instance.id}3 tomcat.debug.port=9${hybris.instance.id}0 tomcat.jmx.server.port=9${hybris.instance.id}4 tomcat.ajp.port=9${hybris.instance.id}5 
+1
source

In addition to the above configuration provided by Zathrus Writer. You may need to add the solr port configuration to say that two hybrid instances are running on the same server.

 solrserver.instances.default.port=8986 

Full configuration:

 tomcat.http.port=9201 tomcat.ssl.port=9202 tomcat.ajp.port=8209 tomcat.jmx.port=9203 tomcat.jmx.server.port=9204 solrserver.instances.default.port=8986 
0
source

Override port configurations in the {HYBRIS_ROOT_DIR} /config/local.properties file.

 tomcat.http.port=9011 tomcat.ssl.port=9012 tomcat.ajp.port=8019 tomcat.jmx.port=9013 tomcat.jmx.server.port=9014 

In addition to the port, we can also override the xmx JVM values ​​in tomcat.generaloptions configurations in config / local.properties, as follows.

 tomcat.generaloptions=-Xmx6G -XX:MaxPermSize=300M -ea -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}" 
0
source

Source: https://habr.com/ru/post/1492121/


All Articles