Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Hybris server's port

Tags:

hybris

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

How do I run the hybris platform using another port?

like image 429
Alex Avatar asked Jul 18 '13 15:07

Alex


3 Answers

Edit your {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 complete configuration reference on the Hybris wiki here: https://wiki.hybris.com/display/release5/Configuration+Properties+Reference

In order for the changes to be applied you must run ant and restart Hybris.

You can run ant all, but if you have only changed the configuration you can deploy these changes without having to re-compile by using ant deploy which is much faster.

like image 188
kabadisha Avatar answered Oct 04 '22 19:10

kabadisha


Create a /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

Then you'll get Hybris server to run on http://localhost:9101.

like image 37
Alex Avatar answered Oct 04 '22 20:10

Alex


If you change the port, make sure you update the spring security port-mappings (should be already using the configuration service and these properties via Spring EL to do this if you're on a recent version of hybris), and, for local development, the site URL resolution (website.<x>.http(s), media.<x>.http(s)) properties and the CMS Site URL mapping regular expressions (ImpEx or hMC). There's also a property for jvdbc I think.

You can change these in the config/local.properties, platform/project.properties or a custom extension's project.properties. The local.properties file has the highest priority (if the property is defined in multiple places), then the custom extension's project.properties, and finally in the platform's project.properties.

like image 34
Eoin Avatar answered Oct 04 '22 20:10

Eoin