How to change Hybris server's port
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.
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
.
If you change the port, make sure you update the spring security port-mapping
s (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
.